Lesson 7 of 11
Overfitting and underfitting
In plain words: Overfitting is memorizing the training data; underfitting is not learning enough from it.
- Overfitting: training score keeps improving while validation score gets worse.
- Fixes: more data, Data augmentation, simpler model, regularization, early stopping.
- Underfitting: both training and validation scores are poor.
- Fixes: a more powerful model, better features, train longer.
- Plot training vs validation scores per epoch — the gap tells you which problem you have.
Tip Early stopping (stop when validation stops improving) is the easiest overfitting fix.
See it in a real project
- How to recommend products your customers will like: too many taste numbers memorize each customer’s past
- How to build your first machine learning model in Google Colab: a decision tree that memorizes when it has no depth limit