Before going into depth about linear regression, allow us to get ourselves familiar with regression. Regression is a technique of predicting a target value based on unbiased predictors. This method is mostly utilized for ascertaining the cause and effect relationship between variables. The number of independent variables and the form of relationship between the independent and dependent variables are the main differences in regression techniques.
Linear Regression is the basic form of regression analysis. Assumptions based on the linear regression model are :
Objective: To find the best fit line for the relationship between the predictors and the predictive/dependent variable.
The equation for best fit line :
y = B0 + B1*x
We can analyze the effect of changes in independent variables on the dependent variable by using the best fit line.
1. Mean Absolute Error (MAE) - The average absolute difference between the real and expected values is calculated.
2. Mean Absolute Percentage Error (MAPE) - The average of the absolute deviation of the expected value from the actual value is known as MAPE. It's the average of the absolute difference between the real and expected values divided by the actual value.
3. Root Mean Square Error (RMSE) - The square root average of the total of squared differences between the real and expected values is calculated by RMSE.
4. R-squared values - The percentage of variance in the dependent variable described by the independent variable in the model is represented by the R-square values.
5. Adjusted R-squared values - The Adjusted R2 value eliminates R2's disadvantage. Only if the added variable makes a major contribution to the model will the adjusted R2 value change. In the model, the adjusted R2 value adds a penalty.
Simple Linear Regression:
Multiple Linear Regression:
In our upcoming articles, we will also have a hands-on implementation of linear regression models on real-world data sets using python.