Polynomial Regression
الانحدار كثير الحدود
Definition
Regression that is linear in the coefficients but uses powers of the feature (x², x³…) to represent curved relationships.
Definition
Polynomial regression fits a curve by applying linear regression to polynomial features of the inputs; higher degrees add flexibility and overfitting risk.
Practical examples
import numpy as np
x = np.array([0, 1, 2, 3], dtype=float)
y = x ** 2
print(np.polyfit(x, y, 2).round(3) + 0.0)Expected output
[1. 0. 0.]
