Machine Learning1 code example
⚡ +100 XP

Bias-Variance Tradeoff

1

Decomposing Prediction Error

The expected prediction error decomposes into three terms: Error = Bias² + Variance + Irreducible Noise Bias — Error from wrong assumptions (model too simple). Underfitting. Variance — Error from sensitivity to training data fluctuations (model too complex). Overfitting. Irreducible Noise — Inherent data noise, cannot be reduced by any model.

2

Bias (Underfitting)

High-bias models make strong assumptions and miss the true pattern. Signs: Training error is high. Test error ≈ training error. Causes: Model too simple (e.g., linear model on non-linear data), too few features. Fix: More complex model, more features, reduce regularization.

3

Variance (Overfitting)

High-variance models memorize training data including noise. Signs: Training error very low, test error much higher. Causes: Model too complex (deep tree, large neural network), too little data. Fix: More data, regularization (L1/L2/dropout), simpler model, early stopping, cross-validation.

4

Demonstrating the Tradeoff

💡

Regularization (Ridge/Lasso) is the primary tool to push back against variance without reducing model capacity.

Finished reading? Mark it complete to earn your XP.