RMSE (Root Mean Squared Error) is simply the square root of MSE — bringing the metric back into the target's original units while keeping MSE's disproportionate penalty on large errors, making it the most commonly reported regression metric in practice.
Formula
Worked Example
Reusing \(MSE=0.48\) from Mean Squared Error:
from sklearn.metrics import root_mean_squared_error # current scikit-learn API
import numpy as np
y_true = [52, 58, 62, 68, 75]
y_pred = [51.8, 57.4, 63.0, 68.6, 74.2]
print(root_mean_squared_error(y_true, y_pred)) # 0.6928
# Equivalently, if using an older scikit-learn version without root_mean_squared_error:
from sklearn.metrics import mean_squared_error
print(np.sqrt(mean_squared_error(y_true, y_pred))) # same result: 0.6928
Version note: older scikit-learn releases required mean_squared_error(y_true, y_pred, squared=False); that squared parameter was deprecated and removed in favor of the dedicated root_mean_squared_error function — check your installed version's documentation rather than relying on an older tutorial's exact syntax.
RMSE ≈ 0.693 vs MAE = 0.64 — Why They Differ
RMSE (0.693) is slightly larger than MAE (0.64) on this same data — this is not a coincidence. RMSE is always \(\geq\) MAE for any dataset, and the gap between them directly signals how much error variability exists: if every error were exactly the same size, RMSE and MAE would be equal; the more errors vary in size (some tiny, some large), the more RMSE exceeds MAE, since squaring disproportionately weights the larger ones.
Why RMSE Is So Commonly the Default-Reported Metric
- Same units as the target — directly interpretable ("typically off by about 0.69 marks")
- Still penalizes large errors more than small ones, like MSE, which is often the desired behavior
- Widely recognized and expected in most business and technical reporting contexts
Practical Use Cases
- The standard "headline" regression metric reported to both technical and business audiences
- Comparing models where large errors should be penalized more, but interpretable units still matter
Common Mistakes
- Reporting RMSE without mentioning MAE alongside it — the gap between them is itself informative about error consistency, and showing only one hides this.
- Using outdated scikit-learn syntax (
squared=False) without checking the installed version's current API.
Interview Relevance
Q: "If RMSE is noticeably larger than MAE for the same model, what does that tell you?" The errors are inconsistent in size — a few large errors are pulling RMSE up disproportionately (since squaring amplifies them), while many errors are likely small; if RMSE and MAE were close, errors would be more uniform in magnitude across all predictions.
Practice Question
Using the MSE you computed for actual \([100, 200, 300]\) and predictions \([110, 190, 305]\), compute RMSE and compare it to the MAE from the previous note's practice question.