A classifier's answers are right or wrong, so you count them. A regression model predicts a number — a house price, tomorrow's temperature, a patient's blood pressure — and it is essentially never exactly right. Predicting a house will sell for £312,000 when it goes for £315,000 is a fine prediction; predicting £120,000 is a disaster. So the question is not "how often is it right?" but "how wrong is it, and in what way?"
Every regression score is built from one raw ingredient — the residual, the gap
between a true value
The metrics on this page are all different ways of boiling a whole cloud of residuals down to one honest number. They disagree, on purpose, about how much a big miss should count — and choosing the right one is a modelling decision, not a formality.
The mean absolute error is the plainest thing you could compute — the average distance between prediction and truth:
Its great virtues are that it is in the same units as the target (an MAE of 3,000 on house prices means "off by about £3,000 on a typical home") and that it is robust: every residual contributes in proportion to its size, so one freak error moves it only a little. Its one drawback is mathematical — the absolute value has a corner at zero, so MAE is not smoothly differentiable, which is why it is a fine report card but an awkward training objective.
The mean squared error squares each residual before averaging:
Squaring changes the whole character of the score. A residual of 10 contributes 100; a residual of 1
contributes only 1. So MSE cares far more about a few large errors than about many small ones — it
penalises outliers hard. It is also perfectly smooth and differentiable, which is
exactly why it is the workhorse training loss for regression. This is the same MSE you met
as the objective being minimised in
MSE's blemish is its units: squared pounds, squared degrees — meaningless to a human. The fix is to take the square root, giving the root mean squared error:
RMSE lives back in the target's units, like MAE, but it keeps MSE's temperament: because the
squaring happens before the root, big residuals still dominate. A useful fact worth
remembering is that
Here is the difference made visible. A handful of predictions have small, ordinary residuals, and one point is an outlier whose error you control with the slider. Watch what happens as you drag its error out: MAE creeps up in a straight line, while RMSE curves upward, accelerating away, because the outlier's squared error grows quadratically.
This is the whole choice in one picture. If a big miss really is much worse than a small one — a wildly mispriced house, a dangerously wrong dosage — you want RMSE's harsh punishment, so minimise it. If instead the occasional huge error is just noisy data you don't want dominating the score, MAE gives you a steadier, more representative "typical miss." Neither is more correct; they encode different beliefs about what a bad prediction costs.
MAE and RMSE tell you the size of the error but not whether that size is good or bad — is an
RMSE of 5 impressive? It depends entirely on the spread of the data. The
coefficient of determination,
The denominator
Plain
A new feature now only raises the adjusted score if it earns its keep — if it improves the fit by
more than a random feature would be expected to by luck. This makes adjusted
| Metric | Units | Outlier sensitivity | Reach for it when… |
|---|---|---|---|
| MAE | Same as target | Low (robust) | You want a plain "typical miss" and don't want rare huge errors to dominate. |
| MSE | Target squared | High | You are training — it is smooth and differentiable. |
| RMSE | Same as target | High | You want a readable error and big misses to be punished hard. |
| R² | Unitless | Medium | You want "how much better than predicting the mean?", comparable across problems. |
| Adjusted R² | Unitless | Medium | You are comparing models with different numbers of features. |
Squaring looks arbitrary until you notice three things it buys you at once. First, it is
smooth — a parabola has a derivative everywhere, including at zero, whereas the
absolute value has a sharp corner there, so squared error slots straight into gradient-based
optimisation while absolute error fights it. Second, it connects the metric to
variance: minimising squared error is minimising a variance, which is why the
mean-predicting baseline in
Two traps snare people constantly. First,
Kaggle Learn's Intermediate Machine Learning course has you score regression models on held-out data, where MAE is a one-line call and the leaderboard is ranked by RMSE. Practise there on a real housing dataset and feel how the choice of metric changes which model looks best.