# Introduction

**Polynomial Regression is** an extension where the relationship between variables is non-linear. Polynomial regression transforms input variables to higher powers (e.g., $$x2,x3x^2, x^3x2,x3$$) but remains a linear model concerning the parameters, making it suitable for more complex patterns.

In polynomial regression, we aim to model a non-linear relationship by transforming the input variable x to include higher powers. The model equation for a polynomial regression of degree $$d$$ is:

$$y = \beta\_0 + \beta\_1 x + \beta\_2 x^2 + \beta\_3 x^3 + \dots + \beta\_d x^d + \epsilon$$\
\
where:

• $$y$$ is the dependent variable,

• $$\beta\_0, \beta\_1, \beta\_2, \dots, \beta\_d$$ are the coefficients,

• $$x, x^2, x^3, \dots, x^d$$ represent the transformed input features up to the $$d$$-th degree,

• $$\epsilon$$ is the error term.

This transformation allows the model to fit a curve that better matches non-linear patterns in the data.

**Example:**

Predicting energy consumption based on home size.

<div align="left"><figure><img src="https://3534497751-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHBhflVf91jxK4ccRhKqv%2Fuploads%2Fgit-blob-9d6759f45e1877713705de58c9fa91b6d3e557bf%2Fml-type-polynomial-regression-min.png?alt=media" alt="" width="563"><figcaption><p>Polynomial Regression</p></figcaption></figure></div>
