Lesson 6 of 9 7 min · 133 words
Prediction error
Residuals and what their patterns tell you.
After fitting, look at the residuals . Ideally they look like random noise: centred on zero, with constant spread and no pattern.
Plot residuals against predictions or each feature. A curve means the relationship is non-linear — add polynomial terms or transform a feature. A funnel (spread growing with ) means non-constant variance — try predicting . Clusters suggest a missing categorical feature.
Points with huge residuals are outliers; points with extreme feature values are high-leverage points. A point that is both can strongly change the fitted line. Check them — they may be data errors.
Formula to remember
MAE
Average absolute error; robust to outliers.
Quick check · +5 XP