Looking for Patterns in Prediction Residuals

Residuals compare observed and predicted values. A plot against input or fitted value can reveal errors that one aggregate hides.

Source
Anbloq
Language
English
Created
Updated
Chapters
4
Reading time
1 min
In this article4 chapters
  1. Trace an ordered set
  2. Choose a meaningful comparison
  3. Inspect signed errors before aggregating
  4. Check slope and groups as well as average bias

Trace an ordered set

If small inputs consistently have positive observed-minus-predicted residuals and large inputs negative ones, a mean residual can hide the pattern. Scatter plots preserve the pairing.

Choose a meaningful comparison

Inspect residuals across relevant groups or input ranges and retain count per group. Aggregates and subgroups explain why differences can disappear in one total.[1]

Inspect signed errors before aggregating

A predictor estimates times six, eleven and sixteen at distances one, two and three, while actual times are eight, thirteen and eighteen. All observed-minus-predicted errors equal two. An MAE reports magnitude two but the residual pattern also shows consistent underprediction. See residuals for fitted lines.

Distance    1   2   3
Actual      8  13  18
Predicted   6  11  16
Residual    2   2   2

Check slope and groups as well as average bias

Residuals that rise with feature value indicate a different error from a constant offset. Evaluate patterns on held-out data and split meaningful groups if potential effects differ.

References

  1. Gareth James et al., An Introduction to Statistical Learning ↩