Member-only story
Machine learning 101 P3: Multiple Linear Regression with Python
5 min readJan 2, 2025
Introduction
Multiple linear regression model also belongs to the family of Regression models together with linear regression model. What differentiates multiple linear regression from simple linear regression lies in these following factors:
- Numer of independent features: There is only 1 independent variable in simple linear regression, while there can be 2+ independent variables in multiple simple linear regression.
- Usage: Simple linear regression focuses on studying the relationship between the singular predicting variable and the singular response variable. Meanwhile, multiple linear regression studies the combined effect of multiple predicting variables on the singular response variable.
- Complexity: While it’s quite straight forward to implement and interpret single linear regression, multiple linear regression model is more complex as it involves more predicting variables.
Mathematical concepts of multiple linear regression
Let’s review the mathematical concepts behind multiple linear regression a bit before jumping into the practical coding part!
The mathematical equation for Multiple Linear Regression is simply an extension from the Linear Regression equation. It is written as follows:
Where:
- y: Dependent variable (response variable).