Charles Jekel
Charles Jekel
@VCasecnikovs I don't remember. I can't seem to find a local copy on my machine, and I don't have a fork on github... Maybe check the network graph, there were...
Thanks for that full traceback. I think I know what the issue is, it's this block of code in the lstsq fit ```python try: ssr = self.lstsq(A) except linalg.LinAlgError: #...
Fair enough :) . I'm glad you've found this work useful! Getting the standard errors for the model parameters is here https://jekel.me/piecewise_linear_fit_py/examples.html#non-linear-standard-errors-and-p-values ```python p = my_pwlf.p_values(method='non-linear', step_size=1e-4) se = my_pwlf.se...
Yes, the equation of the line is y=β1+β2(x−b1)+β3(x−b2)+⋯+βnb+1(x−bnb−1) but note the difference between the math starting at 1 and python starting at 0 for numbering. The `.se` attribute are the...
`beta[-1]` can be negative! You just haven't had a curve with a steep enough slope yet at the end. The final slope needs to cancel out the accumulation of all...
If you happen to know the breakpoints locations for the two curves, then this is pretty easy. So you want to find breakpoints that minimize the L2 error between (yhat1,...
So this is one way to do such a fit. It's rather ugly, but I think it works. ```python import numpy as np from scipy import optimize import pwlf import...
This looks like a failure in the optimization. Can you try fit fast with a large population. Maybe pop=50. The runtime might be quite a bit longer. How many line...
Are you running into something like this? https://jekel.me/piecewise_linear_fit_py/examples.html#bad-fits-when-you-have-more-unknowns-than-data If you don't need 128 segments, i would reduce the number of segments down to a dozen or so fixed break points....
I never ended up merging this feature request for mixed degrees. Take a look at https://github.com/cjekel/piecewise_linear_fit_py/issues/41 using a `degree_list=[0,1]`. It was a rather small commit https://github.com/cjekel/piecewise_linear_fit_py/commit/ef58aaa93d1f07f643456bfdbc5f523ab751ee47 I just didn't get...