Overfitting means the model learned the training rows too well, noise included. It reproduces quirks that will not repeat, so new data goes worse than old. Underfitting is the opposite failure. The model never captured the real pattern, so it does poorly everywhere, training rows included.
Overfitting comes from more flexibility than the data can support. Typical causes are too many parameters, too few rows, or too many passes over the same data. Features that quietly identify individual rows do it too.
Underfitting comes from the reverse. The model is too simple for the pattern, the features leave out what matters, or training stopped early.
Naming them separately matters because the fixes point in opposite directions. Adding capacity to an overfit model makes it worse, and simplifying an underfit one does the same.
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
The diagram below the answer is the concept . Jump to it ↓