05
6 minute interactive lab

Overfitting and generalization

Did the model learn—or memorize?

YOU’LL LEAVE KNOWINGReal learning is performance on examples the model has never seen.
THE EXPERIMENT

Make test performance catch up.

Move the controls. Watch the internal state respond. The explanation follows the behavior—not the other way around.

Conceptual simulationThe behavior is deliberately simplified and labeled; it teaches the relationship, not a trained production model.
TRAINING RUNTune the experiment
Model diagnosisMemorizing
Training set99%
seen examples
Test set34%
unseen examples
65-point gapTry more examples or less capacity.
THE MENTAL MODEL

Real learning is performance on examples the model has never seen.

Training accuracy answers: can the model fit what it saw? Test accuracy answers: did it learn a pattern that survives new data? The second question is the one that matters.

IN DEVELOPER TERMSlearning = low error on unseen_data
GO DEEPER

Check the model against the source.

Connectionism optimizes for intuition, then points you to the rigorous treatment.

  1. Google ML Crash CourseGeneralization
  2. Dive into Deep LearningUnderfitting and overfitting
NEXT CONNECTION

How does a model know how wrong it is?

Loss functions

Continue to lab 06