Data Science (Python) :: Multiple Linear Regression

Sunil Kumar SV
1 min readJun 29, 2017

--

Intention of this post is to give a quick refresher (thus, it’s assumed that you are already familiar with the stuff) of Multiple Linear Regression (using Python). You can treat this as FAQ’s as well.

What is multiple Linear Regression and how is it different from Linear regression?

Multiple regression is applied in places where the dependent variable is dependant on more than one feature. This is the basic difference between multiple regression and linear regression. In linear regression, the dependant variable is dependant on only one independant variable.

*************************************************

Sample code for Multiple Linear Regression?

The code for multiple linear regression and linear regression is the same. The only difference being, the number of columns of the independent variables. In linear regression, the number of columns for independant variable would be just one and whereas for multiple linear regression, it would be more than one.

from sklearn.linear_model import LinearRegression
var_regressor = LinearRegression()
var_regressor.fit(var_X, var_Y) # This fits the Linear Regression model on independant variable matrix var_X and dependent vector var_Y

Next :- Data Science (Python) :: Polynomial Linear Regression

Prev :- Data Science (Python) :: Linear Regression

If you liked this article, please hit the ❤ icon below

--

--

Sunil Kumar SV

#ProductManager #TechEnthusiast #DataScienceEnthusiast #LoveToSolveProblemsUsingTech #Innovation