dschmitz89 / Polyfit

Scikit learn compatible constrained and robust polynomial regression in Python
https://polyfit.readthedocs.io/en/latest/
8 stars 4 forks source link

How to force the curve to pass through the origin (A constrain to fit the curve with y intercept = 0) #8

Open Fasil-OK opened 1 year ago

Fasil-OK commented 1 year ago

Hai, Thank you for scikit learn compatible constrained and robust polynomial regression, it is very helpful. Addition to monotonicity constrain, I want to add a constrain to force my curve to pass through the origin (y intercept = 0). can you help me to do that? Thank you

dschmitz89 commented 1 year ago

This should be possible by eliminating the offset column of the PolynomialFeatures in sklearn terms. Currently, the code is a bit messy but let me iterate a bit. Would you be interested in a PR?