Brain labPlay → read → next · ~6 min

Tutorials · Chapter C (3/4) · ~6 min

Overfitting playground

Play → read → next

Memorizing the training park can fail on a new park.

Simulation game

Overfit park

Crank “memorize harder.” Training score rises — the new park (test) may fall.

Training park

Train accuracy 80%

New park (test)

Test accuracy 65%

Recap

What you just did

You tuned complexity on a training park, then tested on a new park. Too simple misses the pattern; too complex memorizes pebbles and fails new ground.

Teach

How it works

Machine learning wants patterns that generalize. Overfitting happens when the model treats training quirks as laws of nature.

You fight it with: more varied examples, simpler models when data is small, and always checking performance on held-out examples — not only the ones used for training.

Use it

When you'd use this

  • Judging whether a “perfect” demo will work for real customers
  • Knowing why more features isn’t always better
  • Asking: “Did we test on new cases, or only the demo set?”

Watch out

Watch out

100% on training is a brag, not a guarantee. Ask how it does on fresh examples.

Try next

Try this next

Think of a student who memorizes yesterday’s quiz answers. That student overfit the quiz.