Underfitting

Underfitting happens when a model is too simple to capture the underlying pattern in the data, so it performs poorly on both the training data and new data.

Data & AI

An underfit model hasn't learned enough. You'll see low accuracy even on the training set, a sign the model lacks the capacity or training time to represent the relationship.

It's like trying to draw a curvy trend with a single straight line — no matter how you place the line, it misses the shape. Fixes include using a more complex model, adding better features, or training longer.

Examples

Python

# Both scores low = underfitting
print("Train accuracy:", model.score(X_train, y_train))
print("Test accuracy: ", model.score(X_test, y_test))

Output:

Train accuracy: 0.62
Test accuracy:  0.60

Learn it in a lesson

See also

Back to the Dictionary