Lessons / Part 8. Machine learning on small data in plain terms
52 Predicted against actual is the first chart
Every held out run on one chart against the 45 degree line, labelled, so a miss has a name and a direction.
What people usually ask
Plot the model results.
What comes back
A bar chart of R2 by model, with no run visible on it.
Ask this instead
I have preds.csv: columns run_id, actual_moisture_pct and pred_moisture_pct, the held out predictions of a dryer model.
Plot predicted on the y axis against actual on the x axis, one point per run, each labelled with its run_id in small text. Draw the line y = x. Same limits on both axes and equal aspect, so the line sits at 45 degrees.
Label the axes "measured moisture, percent" and "predicted moisture, percent". Say in a caption under the chart which axis is which.
Under the chart, list the five runs farthest from the line: run_id, actual, predicted, and whether the model over or under predicts each. Say whether the misses sit at one end of the measured range.
No bar chart, no score in the title. Save as pred_vs_actual.png at 200 dpi and show it.
Attach: The predictions column with run ids; or the run table and the notebook that made the predictions, with the held out column named.
Why it works: Every run is a point against the line, so a miss can be looked up by its id instead of being hidden inside one number.
Drafted with Fable 5.1 from my notes; chosen and edited by me.