Start studying
Module 1 · Machine Learning Module contents
Module 1  ·  Card 52 / 55beginner

RMSE

RMSE is the square root of MSE.

Taking the root brings the number back into the target's own units.

It still penalises large errors more than small ones.

It is the most commonly reported regression metric.

Use it when big misses genuinely matter more than small ones.

Learn in depth ↓
Module 01 · Machine Learning · 55 concepts
In depth  /  15 lines

RMSE, in more detail

RMSE is MSE with the square root taken at the end.

That one step puts the number back into the units of the target.

An RMSE of five thousand pounds is a sentence anyone can understand.

It keeps the behaviour of MSE while fixing its readability.

Large errors still count much more than small ones.

So RMSE is always at least as large as MAE on the same data.

The gap between those two numbers is itself informative.

If RMSE sits far above MAE, a few big misses are doing the damage.

If they are close, your errors are fairly even in size.

Comparing the two is a fast diagnostic worth doing every time.

It is the most commonly reported regression metric in practice.

Use it when large errors genuinely matter more than small ones.

Use MAE instead when they do not, or when your outliers are just noise.

It cannot be compared across problems on different scales.

Dividing it by the mean of the target gives a rough percentage for that purpose.

Want the full technical article? Wikipedia ↗
Deep dive

What is underneath RMSE

The formula

RMSE=1n∑i=1n(yi−y^i)2=MSE\mathrm{RMSE} = \sqrt{ \frac{1}{n} \sum_{i=1}^{n} \left( y_i - \hat{y}_i \right)^2 } = \sqrt{\mathrm{MSE}}

The square root is there for one reason: it puts the number back into the units of the thing being predicted.

MSE on house prices in thousands is in thousands-squared, which means nothing to anybody. RMSE is in thousands, and can be compared directly to the prices themselves.

It is not a loss, it is a report

The square root is monotonic, so minimising RMSE and minimising MSE find exactly the same parameters.

arg⁡min⁡θMSE(θ)=arg⁡min⁡θMSE(θ)\arg\min_\theta \sqrt{\mathrm{MSE}(\theta)} = \arg\min_\theta \mathrm{MSE}(\theta)

Training therefore uses MSE, because the gradient is simpler and the root adds a chain-rule term for nothing.

RMSE is what gets written in the results table, because it is the one a human can sanity-check against the data.

It is always at least MAE

MAE≤RMSE≤n⋅MAE\mathrm{MAE} \leq \mathrm{RMSE} \leq \sqrt{n} \cdot \mathrm{MAE}

The two are equal only when every error is exactly the same size.

The gap between them is a direct measure of how much the errors vary: the wider the spread, the further RMSE sits above MAE.

That makes the pair more informative than either alone.

RMSE 12 with MAE 10 is a model that is consistently a bit off.

RMSE 40 with MAE 10 is a model that is usually fine and occasionally catastrophic.

Reading one

  1. Compute the residual for every example.
  2. Square them, average, take the root.
  3. Compare it to the standard deviation of the target, which is what predicting the mean would score.
  4. Compare it to MAE, because the gap tells you about the tail.
  5. Only then compare it to another model's, and only on the same dataset.

RMSE is not comparable across datasets with different scales, which is what R-squared is for.

Test yourself

One question on this card. Every option explains itself once you pick, right or wrong.

Question 1
Your RMSE is far larger than your MAE. What does that tell you?
Machine Learning

55 concepts in this module, then a graded test with every answer explained.

Study this module →
↑↓ move↵ openesc close