AI/ML Foundations
Overfitting & Generalization
Overfitting happens when a model learns training-set quirks instead of reusable signal. Generalization is the real target: good behavior on future examples drawn from the problem.
- Training performance alone is not evidence of usefulness
- The train/validation gap is the classic signal
- Underfitting is the opposite failure
- Regularization limits effective capacity
- More representative data is often the cleanest fix
| Train performance | Validation performance | Likely diagnosis | What to try |
|---|---|---|---|
| Bad | Bad | Underfitting | Better features, larger model, train longer |
| Good | Bad | Overfitting | Regularize, add data, simplify |
| Good | Good | Promising | Test once, then monitor production |
| Unstable | Unstable | Data/split/optimization issue | Check labels, leakage, learning rate |