◆ THE BLUEPRINT
What You're Looking At
A polynomial model fit to noisy data. The degree slider controls model complexity. Low degree = rigid line. High degree = wiggly curve that chases every data point.
The Model
Each additional degree adds a free parameter. More parameters means more flexibility to fit the training data.
Why Training Error Always Decreases
A degree-d polynomial has d+1 parameters. More parameters can always fit the training data at least as well. Training MSE is a monotonically non-increasing function of degree.
Why Test Error Has a U-Shape
At low degree the model is too rigid (underfitting). At high degree the model memorizes noise (overfitting). The best test error sits in between.
How to Interact
Slide the degree from 1 to 15 and watch both curves. Toggle "Show True Function" to see where the model agrees with reality. Click "New Sample" several times at a high degree to see how much the fit changes. That instability is variance.