Evaluation
Regression Metrics and Residual Diagnostics
Evaluate continuous predictions with MAE, MSE, RMSE, R-squared, relative errors, residual plots, and scale-aware slices.
By the end you can
- Interpret common regression metrics through their loss geometry and units
- Choose summaries that match asymmetric costs and target scale
- Use residual diagnostics to find systematic structure hidden by averages
- Avoid invalid percentage and normalized-error comparisons
Two models can share RMSE and fail differently
On 2 November 2021 Zillow Group shut down Zillow Offers, the arm that bought houses on the strength of its own price predictions. The third-quarter results carried a roughly $304 million inventory write-down. The company told investors to expect a further $240-265 million of losses in the fourth quarter. It cut about 25% of its workforce — around 1,600 jobs out of 6,400.
The reason its co-founder and CEO gave was not that the model was wrong on average. It was the width of the error distribution. “We've determined the unpredictability in forecasting home prices far exceeds what we anticipated and continuing to scale Zillow Offers would result in too much earnings and balance-sheet volatility,” Rich Barton said the same day. The typical error was survivable. The tail was not.
A model that is modestly wrong about every ordinary house can post the same root mean squared error as one that is nearly perfect on most and catastrophically wrong on a few. Only one of those two puts unsellable inventory on a balance sheet. Regression evaluation therefore begins with the error distribution, not with one average. Magnitude, direction, tail behavior, target scale, and context all matter.
Which average to report is itself contested. In 2014 Chai and Draxler answered a proposal to drop RMSE altogether. They state the charge first: “Willmott and Matsuura (2005) have suggested that the RMSE is not a good indicator of average model performance and might be a misleading indicator of average error”. Their reply is short: “the proposed avoidance of RMSE in favor of MAE is not the solution”. RMSE, they hold, “is more appropriate to represent model performance than the MAE when the error distribution is expected to be Gaussian”. And their conclusion asks for more than one number: “a combination of metrics … are often required to assess model performance”. Nobody wins the argument about the single best average. That is the finding.
The same average loss can arise from very different failure shapes, and only one of them closed a business line.
Comparison
Common regression summaries
Each metric weights errors differently, and the choice is not academic. One of them once settled a million dollars. Netflix ranked its public contest on a single squared-error average, and its organisers, Bennett and Lanning, fixed the number to beat: “The company reported the RMSE performance of Cinematch trained on the Prize dataset against the quiz subset as 0.9514, a 9.6% improvement over simply predicting individual movie averages.” The Grand Prize of $1,000,000 went to whoever improved on that accuracy by a further 10%. The data was over 100 million ratings from 480,189 users on 17,770 movies.
Two details of that design matter more than the algorithms it produced. Entrants were told only their quiz-subset RMSE. The test-subset RMSE that actually decided the prize was never disclosed to them. And the whole ranking rested on four decimal places of one squared-error average. By construction that summary weights a handful of badly predicted ratings far more heavily than a mass of nearly correct ones. It says nothing about which users or which films the misses fell on.
The four families below make that weighting choice explicit: absolute error in the target's units, squared error and its rooted form, the mean-baseline comparison, and errors divided by a reference magnitude.
MAE
Average absolute error in the target’s units.
- Linear penalty
- Robust relative to squared loss
- Easy to explain
- Does not emphasize tails
MSE / RMSE
Average squared error, optionally returned to target units.
- Amplifies large errors
- Smooth optimization target
- Sensitive to outliers
- RMSE depends on scale
R-squared
Improvement in squared error relative to a mean baseline under the evaluated sample.
- Dimensionless summary
- Can be negative
- Depends on target variance
- Not a causal measure
Percentage errors
Scale error by the observed or reference magnitude.
- Can compare relative size
- Explodes near zero
- Weights small targets strongly
- Needs domain-specific safeguards
Example
A small calculation exposes the weighting
Errors for four cases are 1, 1, 1, and 9 units. Nothing about the four numbers changes; only the summary applied to them does. Each summary reports a different lesson about the same four cases.
- MAE: The average absolute error is 3 units.
- MSE: The average squared error is 21, because the 9-unit miss contributes 81.
- RMSE: The square root of 21 is about 4.58 units.
- Median absolute error: The typical case has a 1-unit error, hiding the severe tail entirely.
- Interpretation: Three defensible summaries of one error set span 1 to 4.58 units, so no single number replaces a view of quantiles and worst-case slices.
Visual
Residuals should look boring for the right reasons
Structure in residuals suggests missing information or a mismatched objective. Google Flu Trends is the documented case. It ran high in 100 of the 108 weeks from 21 August 2011 to 1 September 2013, and it overshot the 2011-2012 level by more than 50%. Science published that count on 14 March 2014. Missing high in 100 of 108 weeks is not bad luck. It is a pattern any residual plot against time would have shown.
The authors say so directly: “These errors are not randomly distributed. For example, last week's errors predict this week's errors (temporal auto-correlation), and the direction and magnitude of error varies with the time of year (seasonality).”
A baseline comparison made the same point in one line of arithmetic. Out of sample, Google Flu Trends recorded a mean absolute error of 0.486. A lagged-CDC baseline recorded 0.311. A combined GFT-plus-CDC model recorded 0.232. A model built from nothing but week-old official figures beat the search data outright.
An independent team measured the overestimation from the other side. It put GFT epidemic-intensity estimates far above ILI surveillance in 2012/2013: nationally 268%, regionally 208%, locally 296%.
The patterns worth looking for are the ones that case displays: level bias, error spread that grows with the target, curvature, runs and cycles in time, and large errors concentrated in one region, product, device, or severity group.
Level bias
Residuals sit mostly above or below zero, indicating systematic under- or over-prediction.
Scale pattern
Error spread grows with the target or prediction, suggesting heteroscedasticity.
Nonlinearity
Curved residual patterns reveal relationships not represented by the model.
Temporal structure
Runs or cycles in residuals indicate unmodeled time dependence.
Slice concentration
Large errors cluster in a region, product, device, or severity group.
Key idea
R-squared is a baseline comparison, not a quality certificate
R-squared compares squared error with a constant mean predictor on the evaluated sample. It can be negative when the model performs worse than that baseline. A high value can coexist with unacceptable absolute error when target variance is large. Comparing R-squared across populations with different variance can mislead on its own.
Two instruments can correlate almost perfectly and still disagree by a dangerous margin. A large Wright peak flow meter and a mini Wright meter correlate at r = 0.94. On the same data, the 95% limits of agreement run from -79.7 to +75.5 L/min, around a mean difference of -2.1 L/min, with a standard deviation of the differences of 38.8 L/min. Readings that correlate at 0.94 can still disagree by anything inside those limits. Bland and Altman published that comparison in The Lancet on 8 February 1986, and their summary is blunt: “Such investigations are often analysed inappropriately, notably by using correlation coefficients. The use of correlation is misleading.”
What they proposed instead is a residual plot: the difference between the two methods plotted against their mean, with limits at d +/- 1.96s. Giavarina's 2015 review of the method reaches the same verdict — correlation “is not recommended as a method for assessing the comparability between methods”. The correlation was never measuring agreement. It was measuring whether the two devices moved together.
R-squared inherits the scale and composition of the evaluated target distribution.
Analogy
A tailor who reports only average sleeve error
Two centimeters of average sleeve error is compatible with two very different shops. In one, every sleeve is slightly wrong. In the other, most are perfect and a handful of garments are unwearable.
The mean cannot separate them, and the customer of the second shop is the one who complains. Residual errors also carry a sign, a position in time, and a decision attached to them. The average has thrown all three away before anyone reads it.
Typical error and catastrophic error deserve separate visibility.
Case
RMSE against MAE: neither metric is inherently better
Eight years later the comparison was run the other way, and the contest itself came out suspect. Hodson set RMSE against MAE in 2022 and found that the choice between them “can present a false dichotomy”. His finding is blunt: “Neither metric is inherently better: RMSE is optimal for normal (Gaussian) errors, and MAE is optimal for Laplacian errors”.
Zillow's house prices and Google Flu Trends' autocorrelated weekly misses belong to neither family. For residuals like those, “When errors deviate from these distributions, other metrics are superior”. The question is not which average is right in general. It is which error distribution you are willing to assume for the errors in front of you.
Relative metrics require a denominator policy
MAPE and related measures divide by a reference magnitude. That makes zeros and near-zeros unstable, and gives small targets disproportionate weight. Symmetric variants change those choices but do not erase them.
Regulators have had to write the policy down in full. FDA's final guidance of September 2020 on self-monitoring blood glucose test systems for over-the-counter use sets the criterion in one sentence: “Your studies should demonstrate that your SMBG is sufficient for this purpose by showing that 95% of all SMBG results in this study are within +/- 15% of the comparator results across the entire claimed measuring range of the device and that 99% of all SMBG results are within +/- 20% of the comparator results across the entire claimed measuring range of the device.”
The interesting part is the remedy. At low glucose the denominator gets small and the percentage explodes, and some devices cannot hold 15% there. The agency does not soften the metric. It tells the manufacturer to raise the bottom of the claimed measuring range — to stop making claims where the denominator cannot support them.
ISO 15197:2013 solves the same problem the other way, by switching denominator: at least 95% of results within +/-15 mg/dL below 100 mg/dL, and within +/-15% at or above it. Below 100 mg/dL the percentage is abandoned outright and an absolute tolerance takes over.
Use domain-aware denominators, scale by a meaningful baseline, or report separate ranges. Always state exclusions and clipping rules.
A normalized error is only as meaningful as its denominator, and both FDA and ISO chose to bound the range rather than trust the ratio.
Steps
Build a regression evaluation panel
Use several views that complement rather than duplicate one another. Report error in units stakeholders understand. Show the distribution with median, upper quantiles, tail counts and signed bias. Plot residuals against prediction, target, time and important features. Compare a baseline — mean, median, seasonal naive, or the incumbent — under the same sample. And slice consequences where thresholds, capacity or safety change.
That last step rewrote American clinical practice once. A creatinine equation was refit with age and sex and without race, and Inker and colleagues reported the validation in the New England Journal of Medicine in 2021. Pooled accuracy for the two groups looked much alike: P30 of 87.2% in Black participants against 86.5% in non-Black participants. A report that stopped there would have shown nothing.
The signed residual, measured per group, did not agree: “The new eGFRcr(AS) equation underestimated measured GFR in Black participants (3.6 ml per minute per 1.73 m2; 95% CI, 1.8 to 5.5) and overestimated measured GFR in non-Black participants (3.9 ml per minute per 1.73 m2; 95% CI, 3.4 to 4.4).” One group's predictions run low and the other's run high. Any average over both cancels the two biases against each other and reports a model in balance.
On 23 September 2021 the NKF-ASN Task Force recommended “the adoption of the new eGFR 2021 CKD EPI creatinine equation that estimates kidney function without a race variable”. Its earlier interim statement had already held that “Race modifiers should not be included in equations used to estimate kidney function”. Here the number decides who is referred and who is transplanted. A slice-level residual at that threshold moved two national societies.
1. Report units
Include MAE or RMSE in terms stakeholders understand.
2. Show distribution
Add median, upper quantiles, tail counts, and signed bias.
3. Plot residuals
Inspect against prediction, target, time, and important features.
4. Compare a baseline
Use mean, median, seasonal naive, or incumbent predictions under the same sample.
5. Slice consequences
Measure errors where thresholds, capacity, or safety change.
Key takeaways
- MAE, RMSE, R-squared, and relative errors encode different weighting and baseline choices: Netflix ranked a $1,000,000 contest on one squared-error average, measured against a Cinematch baseline of 0.9514 on a hidden test subset.
- Squared-error metrics emphasize large misses while absolute error preserves linear weighting. Hodson's conclusion is that neither is inherently better — RMSE is optimal for Gaussian errors, MAE for Laplacian ones.
- Residual plots reveal bias, heteroscedasticity, nonlinearity, time structure, and failing slices: Google Flu Trends ran high in 100 of 108 weeks, with errors its authors traced to temporal autocorrelation and seasonality.
- R-squared is a sample-dependent comparison with a mean baseline, not a universal quality score. Bland and Altman's r = 0.94 sat beside 95% limits of agreement of -79.7 to +75.5 L/min.
- Percentage errors require explicit treatment of zero and near-zero targets. FDA answers by narrowing the claimed measuring range, ISO 15197:2013 by switching to +/-15 mg/dL below 100 mg/dL.
- Regression reports should include units, distributions, baselines, residuals, and consequence-oriented slices: a pooled fit with 87.2% against 86.5% accuracy hid signed residuals of 3.6 and 3.9 mL/min/1.73 m2 running in opposite directions.