Overfitting & model complexity
Raise the polynomial degree and see training error fall while test error climbs.
Raise the polynomial degree and see training error fall while test error climbs.
Error vs degree — tap to choose a degree
A model is fitted on training data but judged on data it has never seen. A degree-d polynomial can bend d − 1 times; too few bends and it misses the pattern (underfitting), too many and it threads every noisy training point (overfitting).
Training error can only go down as the model grows, so it is a poor guide. The test error makes a U shape: the bottom of the U is the sweet spot between bias and variance.
Lowest test error on this sample: degree 7 (MSE 0.108). The noise alone gives an MSE of about 0.063.
A model is fitted on training data but judged on data it has never seen. A degree-d polynomial can bend d − 1 times; too few bends and it misses the pattern (underfitting), too many and it threads every noisy training point (overfitting).
Training error can only go down as the model grows, so it is a poor guide. The test error makes a U shape: the bottom of the U is the sweet spot between bias and variance.
Things to try