Regression Metrics
Ways to score predictions of numbers: average error size (MAE), average squared error (MSE, RMSE), and the share of variation explained (R²).
Also MSE · MAE · RMSE · R² · R squared · coefficient of determination · mean absolute error
If you guess how many sweets are in jars, MAE is how far off you are on average. R² says how much better you are than someone who always guesses the average jar.
Where it fits
+All relationships as a list
Is a kind of / part of
Siblings
How it works
Accuracy and precision and recall are for categories. When a model predicts a number, such as a price, a temperature or a delivery time, we measure how far off it is:
- MAE (mean absolute error): the average size of the error. “Off by 18,000 on average.”
- MSE (mean squared error): the average squared error. This is also the usual loss for linear regression; squaring punishes big misses heavily.
- RMSE: the square root of MSE, back in the original units, still sensitive to large errors.
- R²: how much of the variation in the target the model explains, compared with always predicting the average. 1 is perfect, 0 is no better than the average, and it can even be negative for a model that is worse than that.
Which one to report depends on what errors cost. If one disastrous miss is much worse than several small ones, RMSE reflects that; if every unit of error costs the same, MAE does.
The math
Everyday use cases
- Case 01
House price models
"Off by 18,000 on average" (MAE) is easier to explain than a squared error.
- Case 02
Comparing forecasts
R² tells you whether a demand model beats simply predicting last year's average.
Strengths, weaknesses and when to use it
Strengths
- MAE and RMSE are in the same units as what you predict, so they are easy to explain.
Weaknesses
- R² can be misleading on its own (it rises with more features and says nothing about bias).
- A single number hides where the model fails.
When to use itFor any model that predicts numbers; report an error in real units (MAE or RMSE) plus R².
Compare with
Check yourself
- Q01
Which metric is least affected by a few huge errors?
Show answer
B: MAE
- Q02
What does an R² of 0 mean?
Show answer
A: The model is no better than always predicting the average