0% found this document useful (0 votes)
3 views13 pages

Polyynomial Regression (1)

Uploaded by

areebaahraf090
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views13 pages

Polyynomial Regression (1)

Uploaded by

areebaahraf090
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 13

Polynomial regression

In linear regression, the relationship between the


independent variable(s) and the dependent variable is
considered to be linear. However, in some cases, the data
may not follow a linear pattern, and a straight line may not
adequately represent the relationship. This restriction is
overcome by polynomial regression, which accepts curved
or nonlinear relationships.

Dr Tanvir Ahmad 1
What is Polynomial Regression?

 Polynomial regression is a form of regression analysis that


models the relationship between the independent
variable(s) and the dependent variable as an nth degree
polynomial function. In other words, it extends the concept
of linear regression to capture nonlinear relationships
between variables.

Dr Tanvir Ahmad 2
Dr Tanvir Ahmad 3
Math behind polynomial regression

x -the independent variable, β₀, β₁, β₂,


…, βₙ are the coefficients of the
polynomial equation.
By including higher-order terms (x²,
x³, etc.) in the equation, polynomial
regression can capture more complex
patterns in the data.
Dr Tanvir Ahmad 4
The degree of the polynomial
determines the flexibility of the model
in fitting the data. For example, a
quadratic (degree 2) polynomial
regression can capture a parabolic
relationship, while a cubic (degree 3)
polynomial regression can capture an
S-shaped curve as shown in the
picture below.

Dr Tanvir Ahmad 5
Dr Tanvir Ahmad 6
Types of Polynomial Regression

1. Linear — if degree as 1


2. Quadratic — if degree as 2
3. Cubic — if degree as 3
and goes on, on the basis of
degree.

Dr Tanvir Ahmad 7
Dr Tanvir Ahmad 8
Dr Tanvir Ahmad 9
Linear Regression Vs Polynomial Regression

 When dealing with non-linear relationships in


a dataset, Polynomial Regression is often
preferred over Linear Regression. Linear
Regression assumes a linear relationship
between the independent and dependent
variables, which may not accurately capture
the underlying pattern in the data. Polynomial
Regression, on the other hand, allows for
more flexibility by fitting a curve to the data.

Dr Tanvir Ahmad 10
Linear Regression Vs Polynomial Regression

To understand this concept, let’s consider an


example using programming and visualization.

 Suppose we have a dataset that exhibits a non-


linear relationship between two variables, let’s say
x and y. We can start by fitting a Linear
Regression model to the data and observing the
results. The Linear Regression model will attempt
to fit a straight line to the data points, which may
not capture the curvature present in the
relationship.
Dr Tanvir Ahmad 11
Linear Regression Vs Polynomial Regression

Dr Tanvir Ahmad 12
 However, if we apply Polynomial
Regression to the same dataset, we can
fit a curve to better represent the
underlying pattern. By including
higher-order terms (e.g., x², x³) in the
regression equation, the Polynomial
Regression model can capture the non-
linear behavior more effectively.

Dr Tanvir Ahmad 13

You might also like