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.

Try it: Find the right amount of complexity

Each dot is a measurement. Filled dots train the model; hollow dots are new data it has never seen. Make the model more complex and watch both errors.

Loading the interactive example…

See it in a real project

Create my plan