Polynomial Regression | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 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.

9th Apr 2018, 4:22 AM
Pedro Demingos
Pedro Demingos - avatar
3 Answers
9th Apr 2018, 12:43 PM
Pedro Demingos
Pedro Demingos - avatar
+ 3
Do you have a code to show us so we may understand a little more concretely what you're trying to do ?
9th Apr 2018, 8:37 AM
Cépagrave
Cépagrave - avatar
+ 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 )?
9th Apr 2018, 5:41 AM
strawdog
strawdog - avatar