04.linear regression

Linear Regression

Sum of Squared Residuals should be less.. Residual is the difference between the y value of a point and y value of a fitting line

Linear Regression Example1

Evaluation metrics for Regression:

  • Mean Absolute Error (MAE)
  • Mean Squared Error (MSE)
  • Root Mean square Error (RMSE)
  • R Squared Values

MAE - Mean of the absolute value of errors, just average error.
average error = average|true value - predicted value|

MSE - Mean of squared errors
Larger errors are noted more than with MSE than MAE as MSE is a square of the error.

RMSE - Root of the mean of the squared errors.
This is more popular as it will have the effect of MSE (squaring the errors) and as we are doing root too, This will be in same units as y.

R squared values - coefficient of determination.
This is not quite an error metric, more of a statistical measure of our regression model.

In a basic sense, R2 is a measure of how much variance our model accounts for i.e., between 0 and 1. We can also use adjusted R2 value for this.

We can compare model using R2 values but R2 cannot be the sole source for evaluating the model.

Linear Regression example2

Linear Regression Project