For linear regression, we want to see how close our predicted numbers are to the real numbers. The main metrics are:
- Mean Squared Error (MSE): It shows the average squared difference between predicted and real values. Smaller is better because it means predictions are close.
- Root Mean Squared Error (RMSE): This is the square root of MSE. It is in the same units as the target, making it easier to understand.
- Mean Absolute Error (MAE): It shows the average absolute difference between predicted and real values. It is less sensitive to big errors than MSE.
- R-squared (R²): It tells us how much of the variation in the data is explained by the model. It ranges from negative infinity to 1. Closer to 1 means better fit.
We use these because linear regression predicts continuous numbers, so accuracy or classification metrics don't apply.
