piecewise_linear_fit_py icon indicating copy to clipboard operation
piecewise_linear_fit_py copied to clipboard

Add support for force points when a single segment is to be found

Open fredrikhellman opened this issue 1 year ago • 3 comments

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 avatar Sep 26 '24 12:09 fredrikhellman

@fredrikhellman Thanks for this addition!

Can you also add a small unit test for this? (1 segment w/ and w/o forcing points)

cjekel avatar Sep 29 '24 16:09 cjekel

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!

fredrikhellman avatar Sep 30 '24 18:09 fredrikhellman

Thank you! I'm tracking to try to get this in a new release this weekend! LGTM.

cjekel avatar Oct 12 '24 18:10 cjekel