Overfitting Explorer
Interactive exploration of polynomial fitting, bias-variance tradeoff, and overfitting
Training Data & Polynomial Fit
Learning Curves
Understanding Overfitting
Overfitting occurs when a model learns the training data too well, including its noise and random fluctuations. This leads to poor generalization on new, unseen data.
Key Concepts:
- Bias: Error from overly simplistic assumptions (underfitting)
- Variance: Error from sensitivity to small fluctuations in training data (overfitting)
- Bias-Variance Tradeoff: As model complexity increases, bias decreases but variance increases
- Sweet Spot: The optimal complexity minimizes total error = bias² + variance + irreducible error
Experiment Guidelines:
- Try different polynomial degrees (1-15) and observe the tradeoff
- Increase noise to see how it affects the optimal complexity
- Vary training set size to understand sample complexity
- Run bias-variance analysis to decompose the total error