Notes

Underfitting

When a model feels “too simple for the job,” it’s usually not being lazy—it’s being constrained. Underfitting is what you see when a model can’t capture the real patterns in the data, so it performs poorly even on the examples it was trained on.

What underfitting really means

In supervised learning, you train a model to map inputs (features) to outputs (labels). A model underfits when its assumptions are too rigid or its capacity is too limited, so it learns a rule that’s an oversimplification of reality. In the bias–variance view, underfitting corresponds to high bias: the model is systematically wrong in a consistent way. A telltale sign is that both training error and validation/test error are high and fairly similar—there’s no big “generalization gap” because the model never fit the training data well in the first place.

How it shows up in practice

  • House price prediction: using a straight line (linear regression) when prices depend on complex interactions (location × size × condition). Residual plots show clear structure instead of random scatter.
  • Spam detection: a heavily regularized LogisticRegression (very small C in scikit-learn) that can’t weight important words strongly enough, missing obvious spam signals.
  • Credit scoring: a shallow decision tree (e.g., max_depth=1) that reduces rich behavior patterns to a single split.

Why it matters (and what causes it)

Underfitting leads to consistently weak predictions, so improvements in data volume won’t help much—you’re bottlenecked by model expressiveness. Common causes include using an overly simple model class, too-strong regularization, too few features (or overly aggressive feature selection), or training too briefly (e.g., early stopping too early). Diagnostics like learning curves make this visible: performance plateaus early at a disappointing level on both training and validation sets.

Underfitting is a failure mode where a supervised model is too simple or too constrained to capture the true relationship between inputs and labels, yielding high error on both the training set and unseen data (high bias). It matters because underfitting blocks performance gains even with more data and can be diagnosed via learning curves, prompting changes such as a richer model class, better features, or reduced regularization.

Think of trying to describe every animal using just two labels: “small” or “big.” It’s simple, but it misses important details, so you’ll make lots of mistakes. That’s the idea behind underfitting.

In supervised learning, underfitting happens when a model is too simple to capture the real patterns in the training examples. It doesn’t learn enough, so it performs poorly not only on new data, but even on the data it was trained on. For example, a house-price predictor that only looks at square footage might ignore location and condition, leading to consistently bad estimates.