piecewise_linear_fit_py
piecewise_linear_fit_py copied to clipboard
Add support for force points when a single segment is to be found
In the current code the force point arguments (x_c and y_c) are ignored when fitting with a single segment. This commit is an attempt to solve this.
@fredrikhellman Thanks for this addition!
Can you also add a small unit test for this? (1 segment w/ and w/o forcing points)
I have now added two unit tests: both with a single segment, but one with and one without force point. The tests fail on the master branch version of pwlf.py, but pass on this branch. Thanks for a great library!
Thank you! I'm tracking to try to get this in a new release this weekend! LGTM.