Member-only story
Machine Learning 101 P2: Simple Linear Regression with Python
Introduction
In case you want to revise your knowledge on linear regression or you are simply new to this concept, you can check this post and the series for theoretical concepts of different machine learning models and algorithms.
Linear regression model belongs to the family of Regression models (including linear and non-linear). They are quite well-known for its prediction usage of real values, both in use to predict future or unknown present values. Some of the brothers and sisters of linear regression model include:
- Multiple Linear Regression
- Polynomial Regression
- Support Vector for Regression (SVR)
- Decision Tree Regression
- Random Forest Regression
Mathematical concepts of linear regression
Before jumping right into coding part, let’s also revise mathematical equation of simple linear regression:
The mathematical equation for Linear Regression is:
y=β0+β1x+ϵ
Where:
- y: The dependent (response) variable.
- x: The independent (predictor) variable.
- β0: The intercept of the regression line (the value of y when x = 0).
- β1: The slope of the regression line (indicating how y changes with a one-unit…