Cheat sheets
Regression metrics
MAE, MSE, RMSE, R², and MAPE, with when to use each.
| Metric | Formula | Units | Use when | Watch out |
|---|---|---|---|---|
| MAE | target units | every unit of error costs the same; outliers shouldn't dominate | not differentiable at 0 (fine for reporting) | |
| MSE | squared units | training loss; large errors are especially bad | hard to interpret | |
| RMSE | target units | report MSE in readable units | dominated by a few big misses | |
| R² | none | compare against predicting the mean | can be negative on test data; not comparable across datasets | |
| MAPE | percent | relative error across scales | explodes near ; asymmetric | |
| Huber loss | quadratic near 0, linear beyond δ | robust training loss | choose δ |
Worked example. Errors : MAE 9.0, RMSE 9.2. Change one error to 100: MAE 28.0, RMSE 45.6. RMSE reacts five times more.
Always also: plot residuals versus predictions (curvature means a missing nonlinearity; a fan shape means non-constant variance), and compare against a baseline (mean, last value, seasonal naive).
Lessons: Linear regression · Regularization and regression metrics