-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add wegithed least squares approach #62
Conversation
Hi, @cjekel Yes, this is exactly what I wanted. I should probably close my initial PR as redundant. |
@vkhodygo Not sure when I'll get to finishing this. The biggest things will be getting constrained least squares to work and getting standard errors to work. If you want to take a stab at finishing this PR, feel free to go ahead! :) I have no hard deadline for merging this. |
Edit: March 2020, going to abandon weight matrix support for now, as this is just extra work for me... |
@vkhodygo Can your review this and let me know if it address your desire in #60 ?
This approach uses this math:
![image](https://user-images.githubusercontent.com/13884657/73985873-2b5c2a00-48f1-11ea-8b1c-ea34f4f48046.png)
Example of difference between ordinary pwlf and this weighted least squares fit
![image](https://raw.githubusercontent.com/cjekel/piecewise_linear_fit_py/weights/examples/weighted_least_squares_example.png)
What is needed to merge into master
make work with constrained least squares (x_c y_c)abandoned because of ill conditioning