Underfitting happens when a model is too simple to learn important patterns in its data. Like preparing too little for an exam, the model performs poorly because it has not captured enough. section 4.0
A line for curved data
Suppose a dataset resembles a downward-opening parabola. A degree-1 polynomial is only a line, so it cannot represent the curve well and clearly underfits. A degree-2 polynomial captures the main shape, while a degree-10 polynomial may follow every noisy point and overfit. section 4.1
Use these signals to recognize underfitting:
- The model performs poorly on both the training set and the validation set. section 4.15
- Compare models across increasing complexity: very simple models tend to underfit, while very complex models tend to overfit. section 4.1
- Use a model complexity graph to look for the middle ground where validation error is low without choosing unnecessary complexity. section 4.6
Figure 4.5 The model complexity graph is an effective tool to help us determine the ideal complexity of a model to avoid underfitting and overfitting. In this model complexity graph, the horizontal axis represents the degree of several polynomial regression models, from 0 to 10 (i.e., the complexity of the model). The vertical axis represents the error, which in this case is given by the mean absolute error. Notice that the training error starts large and decreases as we move to the right. This is because the more complex our model is, the better it can fit the training data. The validation error, however, starts large, then decreases, and then increases again—very simple models can’t fit our data well (they underfit), whereas very complex models fit our training data but not our validation data because they overfit. A happy point in the middle is where our model neither underfits or overfits, and we can find it using the model complexity graph.
The graph contrasts training and validation error as polynomial degree increases, showing why very simple models underfit and where a balanced complexity may lie. section 4.6








