9 · Evaluation, Metrics & Diagnostics

Regression Metrics & Residuals

Regression metrics quantify prediction error in different units and with different sensitivity to large mistakes. Residual diagnostics reveal patterns that aggregate metrics hide. The topic is split into focused lessons so definitions, implementation decisions, diagnostics and common failure modes can be learned separately.

How to use this topic

Learn the mechanism one decision at a time

Work through the lessons in order if the topic is new. If you already know the basics, open the specific leaf lesson that matches the operation, diagnostic or failure mode you need.

1Definition→
2Mechanism→
3Example→
4Diagnostic→
5Decision
01
MAE and median absolute errorMAE is interpretable in target units and treats each absolute error linearly. Median absolute error is robust to extreme residuals. The important practical question is not only how the technique is defined, but what assumptions it introduces, which data are allowed to influence it, and how its effect should be validated on unseen evidence.
02
MSE and RMSESquared error emphasises large misses. RMSE returns to target units and is useful when large errors are disproportionately costly. The important practical question is not only how the technique is defined, but what assumptions it introduces, which data are allowed to influence it, and how its effect should be validated on unseen evidence.
03
R² and adjusted R²R² compares residual variance with a mean baseline. A good R² does not guarantee unbiased or well-calibrated predictions; adjusted R² is mainly a classical linear-model diagnostic. The important practical question is not only how the technique is defined, but what assumptions it introduces, which data are allowed to influence it, and how its effect should be validated on unseen evidence.
04
Percentage and log errorsMAPE is intuitive but problematic near zero. sMAPE and log-scale losses may help for multiplicative targets but change the optimisation meaning. The important practical question is not only how the technique is defined, but what assumptions it introduces, which data are allowed to influence it, and how its effect should be validated on unseen evidence.
05
Residual analysisPlot residuals against predictions, key features and time. Structure, changing variance or systematic bias indicates missing relationships or data problems. The important practical question is not only how the technique is defined, but what assumptions it introduces, which data are allowed to influence it, and how its effect should be validated on unseen evidence.