Skip to main content

Overfitting Arena

Build intuition for train error, test error, and the generalization gap. Change model flexibility, sample count, and label noise, then watch when the fit is too simple, just right, or memorizing the sample.

Course

Overfitting Arena

Tune model flexibility, training set size, and label noise. Watch when the fit captures signal, when it crawls, and when it starts memorizing noise.

Plenty of clean points. Easy to see the sweet spot before the model starts memorizing wiggles.

true signalfitted modeltraining points
Train error
0.300
Test error
0.307
Generalization gap
0.007
Diagnosis

Underfitting

The model is too stiff to capture the pattern, so both training and hidden-test error stay high.

Increase flexibility a few notches before touching anything else.

Hidden test set is hidden. Reveal it after you make a prediction.

Complexity sweep

Training loss usually falls monotonically. Test error only improves until the model starts memorizing.

lower test error wins
0123456789101112