liveBook · Manning

Underfitting

As explained in Grokking AI Algorithms, Second Edition

Underfitting is a condition in which a model is too simple or insufficiently trained to perform well even on its training data.

Underfitting happens when a model is too simple or insufficiently trained to learn useful patterns. It performs poorly on both its training data and new data. section 8.13 section 8.17

A useful contrast is overfitting. An overfit model memorizes training examples and struggles with variation in new data; an underfit model fails to learn enough from either set. A good fit captures concepts rather than memorizing details. section 8.13

Use performance patterns to distinguish the three cases:

  • Underfitting produces many incorrect classifications on training and unseen data. section 8.17
  • Overfitting produces very high training accuracy but poor performance on new, unseen data. section 8.13 section 8.17
  • An ideal fit lies between these extremes and generalizes beyond the examples used for training. section 8.13 section 8.17

Studying for an exam

Imagine three students preparing for an exam. One does not study and fails both the practice test and the real exam: this is underfitting. Another memorizes the practice-test answers, scores perfectly there, and fails when questions are worded differently: this is overfitting. A student who understands the concepts may miss details but can solve unfamiliar questions: this is a good fit. section 8.13

Figure 8.26 Underfitting, ideal fit, and overfitting
08_26

Compare underfitting, ideal fit, and overfitting visually to connect error patterns with model generalization. section 8.17

How Grokking AI Algorithms, Second Edition covers it

How deep it goes
Defines underfitting through contrasts and an analogy, then stops short of prescribing a specific remedy.
Examples
Uses an exam-study analogy, incorrect classifications, training accuracy, unseen-data performance, and a fit-comparison figure.
What it assumes
Assumes basic familiarity with models, training data, and accuracy while explaining fit through everyday examples.
What you can do after
Evaluate model fit by comparing training performance with performance on new, unseen data.
How it connects
Connects underfitting with overfitting, generalization, training data, unseen data, decision trees, and pruning.

Also explained in

Compare how 7 books explain underfitting →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Grokking AI Algorithms, Second Edition. The section links point to the parts of the book it draws on.