Error vs Model Complexity
Training error, test error, bias, variance, underfitting and overfitting, on one page.
Video explanation
Error vs model complexity (2 min 24 s): why the training curve only falls, why the test curve is a U, and why the far-left model is high bias / low variance.
The bias–variance tradeoff (3 min 35 s): bias and variance shown with many models trained on different datasets, the U-curve, and how loss-vs-epoch plots map onto it.
The graph
| Curve | Shape | Why |
|---|---|---|
| Training error | Always decreasing ↘ | A more complex model can always fit its own training data at least as well |
| Test error | U-shaped ↘↗ | Falls at first (learns the pattern), then rises (starts fitting noise) |
Bottom of the test U = sweet spot (the best model).
The two ends
| Position | Train error | Test error | Gap | Diagnosis |
|---|---|---|---|---|
| Far left (too simple) | High | High | Small | Underfit = high bias, low variance |
| Sweet spot | Low | Lowest | Small | Good fit = low bias, low variance |
| Far right (too complex) | Very low | High | Large | Overfit = low bias, high variance |
Bias and variance: what they mean
Bias: how far the average model is from the truth. It comes from the model being too simple.
Variance: how much the model changes when the training data changes. It comes from the model being too complex.
Tradeoff: as complexity goes up, bias ↓ and variance ↑.
Test error ≈ bias² + variance + irreducible noise
Quick rules for exams
- A curve that only goes down is training error.
- A U-shaped curve is test / validation error.
- Both errors high and close together → high bias (underfit).
- Training error low but test error high (big gap) → high variance (overfit).
- Loss increasing over epochs is not bias or variance. It means the learning rate is too high.
- More epochs ≈ more complexity, so the validation curve is the same U. Stopping at its bottom is early stopping.
Practice question (ET Jan 25)
Plot of error vs model complexity. Curve (1) is U-shaped, curve (2) keeps decreasing, point (3) is at the far left.
(1) = test error ✔ · (2) = training error ✔ · (3) = high bias, low variance ✔
Answer: options 1, 2 and 3. The other three options swap these labels.