CAB212 · Unit 1: Machine learning foundations
Overfitting, underfitting and the bias-variance trade-off
8 practice questions
Key points
- Overfit: low train error, high test error
- Underfit: both errors high
- Error = bias^2 + variance + noise
- Regularization and more data reduce variance
A model should generalize: perform well on unseen data, not just the training data.
- Underfitting: model too simple; high error on both training and test data (high bias).
- Overfitting: model memorizes noise; low training error but high test error (high variance).
Bias-variance decomposition: expected squared error = bias^2 + variance + irreducible noise.
| Bias | Variance | Train error | Test error | |
|---|---|---|---|---|
| Underfit | High | Low | High | High |
| Overfit | Low | High | Low | High |
Remedies for overfitting: more data, simpler model, regularization, early stopping, dropout, feature selection. Remedies for underfitting: more expressive model, more features, less regularization.
Exam pitfall: adding model complexity always lowers training error but not test error; test error is U-shaped against complexity.
Try two questions
Which technique helps reduce overfitting?
- Increasing model complexity unboundedly
- Removing all training data
- Training longer on the same noisy data without checks
- Regularization
Show the answer
D. Regularization penalizes complexity.
A model with high error on both training and test sets is:
- Underfitting
- High variance
- Perfectly fitted
- Overfitting
Show the answer
A. It is too simple to capture the pattern.