View on GitHub

Overfitting: why a perfect score is a red flag

Machine learning lesson ready

This model scored 100%. That’s the problem.

The idea

A model that memorizes its training data looks perfect until it meets new data. Fit a curve through ten points with a degree-9 polynomial and it passes through every one, then swings wildly between them.

The fix is to hold data back. The gap between training and validation error is the most useful number in machine learning, and this lesson shows it moving as model complexity grows.

What the lesson will build

Key ideas

The video

The lesson is ready: code and a line-by-line walkthrough in machine-learning/10-overfitting/.


All topics · Suggest a topic