Residual Plot
noun
say it: “rih-ZIJ-oo-ul PLOT” /rɪˈzɪdʒuəl ˈplɑt/
A chart that plots a model's errors against its predictions, used to spot patterns the model failed to capture.
What is a residual plot?
A residual plot is a scatter plot with each example's guess along the bottom and its residual (actual minus guess) up the side. Good misses scatter evenly around 0; a pattern, such as a curve or a fan that widens to the right, shows something the model missed.
import matplotlib.pyplot as plt
guessed = [28, 27, 34, 41, 50]
minutes = [30, 25, 40, 47, 60]
residuals = [m - g for m, g in zip(minutes, guessed)]
plt.scatter(guessed, residuals)
plt.axhline(0, color="gray") # misses should scatter evenly around this line
plt.show()
In a sentence
- “The residual plot fanned out to the right: the longer the delivery, the bigger the misses.”
- “Points scattered evenly around zero on the residual plot, a good sign.”
Level: Journeyman · More AI Basics terms at this level
Updated