Overfitting vs Underfitting: Diagnosing Bias and Variance
Low training error was never the goal. It was always a proxy for something you can't measure directly — and proxies can be gamed.
Intermediate
| Pattern | Diagnosis |
|---|---|
| baseline and training error are both high, close together | underfitting (high bias) — the model isn't even matching a simple baseline |
| training error is close to baseline, but validation error is much higher | overfitting (high variance) — the model matches the data it trained on but not new data |
| training and validation error are both close to the baseline | a well-fit model — the "just right" middle ground both failure modes are defined against |
| Curve shape | Meaning |
|---|---|
| Both curves plateau early, at a high error, close to each other | high bias — more data won't help, the model itself needs to change |
| Training error stays low; validation error slowly converges toward it as data grows | high variance — more data is directly useful and will keep closing the gap |
| Underfitting (high bias) | Overfitting (high variance) |
|---|---|
| add more/better features | collect more training data (often the single most effective fix, when available) |
| add polynomial features, or use a more expressive model | use fewer features, or a simpler model |
| use a bigger neural network (covered in the Deep Learning track) | increase regularization — a dedicated page, next in this track |
| decrease regularization strength | early stopping — stop training once validation error starts climbing while training error keeps falling |