Skip to content
ML Academy

Introduced on day 11

Residual

The difference between an observed value and the model's fitted or predicted value for that row; the part of the target the model did not explain.

In detail

For least squares, residuals sum to zero on the training data and the fit minimizes their squares. The pattern of residuals, not their average, diagnoses the model: a curve against fitted values points to the wrong functional form, a widening funnel to unequal spread, and runs by date or group to dependent errors. Residuals on held-out rows are the prediction errors that metrics such as MAE summarize.