Overfitting & the bias–variance trade-off
Step 5 of 21 in Machine Learning · Theorem · Medium
Expected error = bias² + variance + noise. Simple models underfit (high bias); flexible models overfit (high variance). Validation error, not training error, tells you which.
Build it
See the U-curve
Fit polynomials of degree 1–15 to noisy samples of sin(x); plot train and validation error by degree.
Done when: Training error falls while validation error forms a U.
Case study: Google Flu Trends
- Search-term correlations predicted flu well, then overestimated by about 2× in 2013.
- With millions of candidate terms, some matched flu seasons by chance (overfitting).
- Search behaviour changed over time, so the learned relationship drifted.
Resources
- Wikipedia: Bias–variance tradeoff Article
- ISLR / ISLP (free book) Book
- StatQuest Video
Earn this star
On the map, you log what you built. Finish the step and its star lights.
Open this step on the map