Overfitting playground
Trace: spam filter or sports-shot toy numbers
Walk one decision from inputs to evidence with toy numbers — then flip one assumption and see if the choice still holds.
1Learn the idea
Read
End-to-end trace (spam or shots)
Scenario A — spam filter: Practice texts look easy; the flexible model hits 99% train and 84% val. You reduce tree depth (simpler rules). New scores: 93% train, 91% val. Gap shrinks from 15 to 2 points. Prefer the second model for estimated generalization.
Scenario B — sports-shot toy: Same numbers, different story: the flexible model memorized one gym’s quirks; the simpler model keeps more skill on a new court.
Numbered state transitions:
- Capture input — labeled practice set + held-out val set; version your notebook.
- Apply mechanism — flexible fitting can absorb signal and noise; val labels do not update weights.
- Record controls — capacity / tree depth, split, early-stop patience.
- Inspect signal —
gap = 0.99 − 0.84 = 0.15. - Compare to baseline — flexible vs simpler (93/91, gap 0.02).
- Store evidence — both score pairs, control change, and a “does not prove worldwide performance” note. No real classmate message text in the log.
Read
Perturb the trace
Change one assumption: validation labels were noisy, or the friend set comes from a different language, or you accidentally tuned on val for a week. Mark which steps break. Silent “still 99% train” is not enough — say whether the original ship decision still holds.
Read
Sensitivity mini-lab
Hold everything fixed and imagine val is 88% instead of 84%. Gap becomes 11 points — still large. Or imagine simpler model lands at 90/89. Decision may stay the same. Write both beside the original so a reviewer sees the first divergence point.
Read
Narrate without polishing
A worked trace is not a marketing story. It is a lab notebook page another student can re-run. Use short labels: Input v1, Flexible fit, Gap 0.15, Simpler depth, Gap 0.02, Decision: ship simpler. If you catch yourself writing “the AI understood spam,” rewrite to “the flexible fit reduced training error, including possible quirks; validation stayed lower.”
Close the page by stating the unit and denominator again: percentage points on this labeled toy set. That discipline keeps the dramatic 15-point gap from floating free of meaning when you paste it into a slide.
Go deeper
Before you start
Why this matters
Estimate before calculating: if training accuracy is 99% and validation is 84%, what is the gap? Write 0.99 − 0.84 = ? and what that gap means for a spam filter or a sports-shot guesser. Note one assumption (same labeling style, enough examples, no peeking).
Related lessons
Check your understanding
Page assessment
Answer from memory. Completion is saved from this evidence, not from opening the next page.
All responses are required.