how to perform Simple and Multiple Linear Regression. In this article, we will go through the program for building a Polynomial Regression model based on the non-linear data.

Overview

In the previous examples of Linear Regression, when the data is plotted on the graph, there was a linear relationship between both the dependent and independent variables. Thus, it was more suitable to build a linear model to get accurate predictions. What if the data points had the following non-linearity making the linear model giving an error in predictions due to non-linearity?

Non-Linear Data points (Source)

In this case, we have to build a polynomial relationship which will accurately fit the data points in the given plot. This is called Polynomial Regression. The formula for a Polynomial Regression curve is given as y=w1x+w2x²+..+b

Below are the GIFs of fitting both a Linear Regression model and a Polynomial Regression model on a non-linear data.

#artificial-intelligence #machine-learning

Machine Learning Basics: Polynomial Regression
1.90 GEEK