Why Linear Regression is of Different Types ?

Sandhya S
2 min readMay 12, 2023

--

Since all Linear Regressions are used to find the relationship between the continuous variable ,what are all difference between them and Let’s see their use cases

Simple Linear Regression:

The ML Algorithm which mainly used for Continuous Data,to predict the relationship between dependent variable and one independent variable

The core idea is to obtain a line that best fits the data. The best fit line is the one for which total prediction error (all data points) are as small as possible.

Prediction or Target output is always a Continuous value for all Linear Regression Types.

Y=bx+c

Let’s Slope be b,

If b > 0, then x(predictor) and y(target) have a positive relationship. That is increase in x will increase y.

If b < 0, then x(predictor) and y(target) have a negative relationship. That is increase in x will decrease y.

Features:

Always Linear.It should contain only one independent variable

Multivariate Regression:

There is a target variable which is dependent on multiple causal effect (independent variable),then in that case we have to go for Multivariate Regession.

For Example Price of the Stocks depends on multiple internal and external factors.

Y=b0+b1x+b2x+…+c (b1,b2->independent varibales)

Features:

It handles both Linear and non Linear relationships.It can train the model with multiple columns of features

Polynomial Regression:

What if the relationship between independent variable and dependent variable is not Linear?

We need to enhance the model’s complexity to overcome under-fitting by adding the degree to the function.In this sense, we need to make linear analyzes in a non-linear way, statistically by using Polynomial,

Y=b0+b1x1+b2x1²+…+bnx1^n (b1,b2->independent varibales,1,2->Degrees)

Features:

Non Linear relatioship.DataScientist should maintain appropriate degree to train the model ,otherwise it leads to Overfitting.

Code Snippet:

Keep Learning…

Please do follow me for Data Science and Bigdata updates

@LinkedIn

Thanks for Reading!

--

--

Sandhya S
0 Followers

IT Professional Learning AI Everday Along with Everyone .I am trying to make Data easy to Understand