fit piecewise linear data for a specified number of line segments
You can now perform fit
and fitfast
for one line segment! Both routines do the same linear regression in this case.
You can now manually specify a random seed on init. This will give you reproducible results with the fit
and fitfast
methods which are stochastic.
pwlf.PiecewiseLinFit(x, y, seed=123)
linalg.inv
now use linalg.pinv
. All APIs are still the same, but this is potentially a backwards breaking change as previous results may be different from new results. This will mainly affect standard error calculations.calc_slopes
was called after every least squares fit in optimization routines trying to find breakpoints. This would occasionally raise a numpy RuntimeWarning
if two breakpoints were the same, or if a breakpoint was on the boundary. Now calc_slopes
is not called during experimental breakpoint calculation, which should no longer raise this warning for most users. Slopes will still be calculated once optimal breakpoints are found!conda force installs are now officially mentioned on readme and in documentation
This is version 2.0.4 of pwlf. It will be the last version to support Python<3.6
.