AI · interactive
Overfitting
A model should learn the pattern, not memorise the examples. Fit curves of increasing flexibility to 10 noisy training points, then score them on 10 points they never saw.
Filled: training points. Rings: held-out points. Dashed: the true pattern.
Error by flexibility (degree 1–9)
Purple: training error. Green: held-out error.
train 0.014 · held-out 0.015
Flexible enough to follow the pattern, not the noise. Training and held-out errors are both low.
1 2 Keep a validation set the model never trains on. That error is what users will experience.
And a final test set you look at once.
3 4
In production
Tools and technologies
Every training tool reports train and validation loss for this reason.
Not tied to one language — use these names when you search docs or design a system.