Skip to content

fitting error when use approximate_curve #156

Closed
@maozaizhou

Description

@maozaizhou

Describe the bug
hi, when i use the approximate_curve function to fit some 2d points, there are obvious fitting error in first few points,but it looks fitting well in the end
To Reproduce
Steps to reproduce the behavior:

  1. here is the 2d points
    fitting_points.txt
  2. then run some code like example
    degree = 3 curve = fitting.approximate_curve(points, degree)
    the result plot like this
    fitting_error_degree2

compare2
the purple points is the original points which i want to fit , the purple line is fitting by scipy LSQUnivariateSpline , the huge difference locate in first few points

then i try revert the points order , the same error still appear in first few points like the plot show bellow
compare3
fitting_error_revert

appreciate if any suggestion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThere is a problem with the code or documentation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions