liveBook · Manning

Overfitting

As explained in Machine Learning System Design

A condition in which a model fits its training data too closely and performs poorly on unseen data because it captures insignificant or non-generalizable patterns.

Overfitting occurs when a model performs well on training data but poorly on unseen data. It has become too specialized, capturing insignificant details rather than patterns that generalize. section 9.1.1

The problem reflects a bias–variance tradeoff. Increasing model capacity can capture more useful signals and reduce bias, but also increases sensitivity to training-set fluctuations and the risk of overfitting. section 9.1.1

Check these signals and contributors:

  • Compare training and validation behavior rather than relying on training performance alone. section 9.1
  • Treat decreasing training loss alongside increasing validation loss as a classic high-variance pattern. section 9.1.3
  • Investigate excessive model complexity, data leakage, and noisy or highly granular features that encourage irrelevant patterns. section 9.1.1
  • Reduce model capacity or increase regularization when the diagnostic pattern confirms overfitting. section 9.1.3

A diverging loss curve

A model’s training loss continues to decrease while its validation loss increases. The model is fitting the training examples more closely without improving on unseen data, indicating potential overfit. section 9.1.3

Figure 9.6 Loss is decreasing for training but not validation, reflecting potential overfit.
figure

Use the loss-curve figure to recognize the visual pattern in which training loss decreases while validation loss does not. section 9.1.3

How Machine Learning System Design covers it

How deep it goes
Defines the condition, explains bias–variance causes, identifies contributing data problems, and prescribes capacity or regularization changes.
Examples
Uses training-versus-validation loss curves and increasing model complexity to illustrate overfitting and rising variance.
What it assumes
Explains training, unseen data, bias, variance, and underfitting alongside overfitting rather than assuming those distinctions.
What you can do after
Diagnose overfitting from learning or loss curves and respond by reducing model capacity or increasing regularization.
How it connects
Connects overfitting with learning curves, underfitting, bias–variance tradeoff, data leakage, model complexity, and regularization.

Also explained in

Compare how 24 books explain overfitting →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Machine Learning System Design. The section links point to the parts of the book it draws on.