# Underfitting

*noun*

say it: **“UN-der-fit-ing”** **/ˈʌndərˌfɪtɪŋ/**

When a model is too simple to learn the real pattern in its data, so it predicts poorly even on the examples it learned from.

## What is **underfitting**?

**Underfitting** is when a model is too simple to catch the pattern, such as a straight line through harvests that
rise and then fall. It scores badly on its training data and on new data alike; the fix is a more flexible model or
better features.

```python
from sklearn.linear_model import LinearRegression
rain = [[10], [20], [30], [40], [50]]
apples = [100, 160, 180, 160, 100]   # up, then down
line = LinearRegression().fit(rain, apples)
print(round(line.score(rain, apples), 2))   # 0.0: no better than guessing the average
```

## In a sentence

- “Adding polynomial features cured the **underfitting**.”
- “The straight line was **underfitting**: it missed even the training orchards.”

Level: Journeyman · [More AI Basics terms at this level](https://www.ask-codey.com/glossary?category=ai&level=3)

Updated: November 19, 2026

Source: https://www.ask-codey.com/glossary/underfitting
