Lesson 7.3: Polynomial Regression
🔹 What is Polynomial Regression?
Polynomial Regression is a type of Linear Regression where the relationship between the independent variable(s) and the dependent variable is modeled as a polynomial (non-linear) equation.
Equation (degree 2):
Y=b0+b1X+b2X2Y = b_0 + b_1X + b_2X^2
-
Can extend to higher degrees: X3,X4…X^3, X^4…
-
Captures curved relationships that linear regression cannot.
🔹 Key Concepts
-
Transforms input features into polynomial features.
-
Useful when data shows non-linear patterns.
-
Degree of polynomial affects model:
-
Low degree → Underfitting
-
High degree → Overfitting
-
🔹 Example
Predicting sales based on advertising spend:
-
PolynomialFeaturestransformsXinto polynomial terms. -
LinearRegressionfits the model to transformed features.
🔹 Advantages
-
Captures non-linear relationships.
-
More flexible than simple linear regression.
✅ Quick Recap:
-
Polynomial Regression → Models non-linear relationships using polynomial terms.
-
Degree selection is crucial to avoid underfitting/overfitting.
