Course contentsShow
← Computer Science
Lesson 2809 of 2,87262. Machine Learning FundamentalsFree lesson

What is Underfitting?

Recognizing underfitting when a model is too simple to capture the underlying patterns in data.

What is Underfitting?

You'll learn: How to recognize when your machine learning model is too simple to learn the real patterns in your data.


The Core Problem

Underfitting occurs when your model is too simple to capture the underlying structure of your training data. It's like trying to fit a straight line through data that curves—no matter how well you adjust that line, it will never match the true pattern.

An underfit model performs poorly on both training data and test data because it hasn't learned the actual relationships. It's the opposite problem from overfitting (where models are too complex and memorize noise).

Why It Happens

Underfitting typically stems from:

  • Model too simple: Using linear regression when the relationship is polynomial
  • Insufficient features: Missing important variables that explain the pattern
  • Over-regularization: Constraints are so strict the model can't learn
  • Training too briefly: Stopping optimization before the model converges

An Analogy

Imagine learning to recognize animals but only being taught "has four legs = dog, has two legs = bird." This oversimplified rule underfits reality—you'll misclassify cats, horses, chickens, and penguins because your model lacks the complexity to distinguish them properly.

Signs of Underfitting

  • High training error: Poor performance even on data the model has seen
  • High bias: The model makes systematic errors due to wrong assumptions
  • Similar train and test performance: Both are bad (unlike overfitting where train is good, test is bad)

Key Takeaway: Underfitting means your model is too simple to learn the true patterns—it shows high error on both training and test data, indicating you need more model complexity or better features.