Page 7 of 8~96 min topic

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.

~12 min this pageWorked example

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:

  1. Capture input — labeled practice set + held-out val set; version your notebook.
  2. Apply mechanism — flexible fitting can absorb signal and noise; val labels do not update weights.
  3. Record controls — capacity / tree depth, split, early-stop patience.
  4. Inspect signalgap = 0.99 − 0.84 = 0.15.
  5. Compare to baseline — flexible vs simpler (93/91, gap 0.02).
  6. 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).

Check your understanding

Page assessment

Answer from memory. Completion is saved from this evidence, not from opening the next page.

1. What inputs and controls did the trace use?
2. Why prefer 93/91 over 99/84 here?
3. What happens if you perturb one assumption?
4. What must the evidence package include besides a single accuracy?

All responses are required.