Machine Learning
Lesson 2 of 4 10 min +100 XP

Overfitting & Train/Test Splits

Measuring true generalization.

What you'll learn

  • Explain held-out test data
  • Define overfitting
  • Recognize the symptom
Memorizing the practice test

A student who memorizes last year's exact exam aces the practice but bombs the real test with new questions. That's overfitting; splitting data into study material and a fresh test is how we check a model truly learned, not just memorized.

Don't grade your own homework

Split data into a training set (to fit) and a test set (to estimate performance on unseen data). Evaluating on training data flatters the model.

Overfitting

A model overfits when it memorizes noise — high training accuracy but poor test accuracy.

Knowledge Check

+25 XP / correct

1. Why hold out a test set?

2. The classic sign of overfitting is…