+ 3
Polynomial Regression
I want to do a polynomial regression in Python, but I’d like one of the terms to be zero. Specifically, I want to fit a second order polynomial p(x) = Ax^2 + Bx + C to a group of points, but with B set to 0, so that I’m actually fitting to Ax^2 + C. Is there anything in NumPy or SciPy that helps? Or anywhere else.
3 Antworten
+ 2
I found one that works:
scipy.optimize.curve_fit
https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.curve_fit.html
+ 3
Do you have a code to show us so we may understand a little more concretely what you're trying to do ?
+ 1
I am not sure i've got your question right, but may be you should look towards numpy.polyval (https://docs.scipy.org/doc/numpy/reference/generated/numpy.polyval.html )?