Codele / Machine learning: one neuron to deep learning
Overfitting and testing
A model can score perfectly on the examples it studied and still fail on new ones, like a student who memorised last year’s exam answers. The cure is to hide some dots and test on them.
- The training set is what the model studies. The test set is hidden until the model is finished.
- The wiggly line memorises every training dot. Its training error is 0, which looks perfect.
- Overfitting means fitting the training dots too closely, noise included, so new dots are missed.
- Judge a model by its test error, never by its training error alone.
- A simpler model often does better on new data because it learns the pattern, not the noise.
Loading the playable lesson…