Simple Linear Regression
Regression can be classified as Linear and Non linear. Where Simple linear regression comes under Linear Regression.
Simple Linear Regression models describes the relationship between variables by fitting a line to the observed data. It helps us to understand ‘How strong the relationship is between two variables’ and ‘Value of the dependent variable at a certain value of the Independent variable’. It is the same equation we learned in our school days, ‘y = mx + c’.
Where m is slope/coefficient attached with input variable and c is intercept. Regression line fits to data points in such way, it can predict the dependent variable on Y-axis given the independent variable on X axis. It uses ‘Gradient Descent Algorithm’ to best fit the regression line to data points.
Get Satya Shelke’s stories in your inbox
Join Medium for free to get updates from this writer.
Before applying Linear regression, there are some prerequisites for dataset.
- Homoscedasticity: Error in our prediction doesn’t change significantly across the values of the independent variable.
- Independent Predictors: Predictor variables should not posses any relationship with each other.
- Normality: Data should follow Normal Distribution.
- Linear Relationship: Independent variables should have Linear relationship with Target/Dependent variable.
If data set exhibit all above assumptions of Linear Regression, we can apply Linear regression algorithm from Library called ‘Scikit Learn’.








