Regression and Overfitting — A Curve Fitted Too Closely to the Points Misses New Data

When a curve is fitted to measured points, see with pictures and motion what decides whether it hits or misses on new data.

Fit polynomial and Gaussian-basis linear models to synthetic data on firing temperature and relative density (Data A), made for teaching purposes. Check against the equations in the text, using the numbers on the screen, that the training error keeps falling as the degree rises while the validation error starts to grow partway (overfitting); that regularization λ suppresses this; how bias and variance trade off behind it; and that in Bayesian linear regression the predictive uncertainty splits into two parts, one from noise and one from lack of knowledge.

Does a curve that fits the points exactly also fit new data?

Fit a curve to the recorded points, the way you bend a wire. Will a curve that fits the points exactly also fit newly measured data?

These are synthetic data for teaching purposes (the true relation between temperature and packing is a made-up formula, shown by the gray dashed line).

Back to Machine Learning — From Probability to GPT (Contents) | Text: Chapter 6, Section 6.2, Chapter 8, Section 8.6 | Equations and explanation (explanation page) | Equations are typeset with the browser’s built-in MathML (no external library).