Underfitting

When a model is too simple to capture meaningful structure in the data.

Why does a flat forecast miss both seasons?

A fictional conservatory records visits in a low and a high season. A model that always predicts 100 visitors misses the recurring seasonal pattern, including on the examples used to fit it.

SeasonObserved training countsConstant prediction
Low58, 62100
High138, 142100

What would indicate underfitting?

The constant misses all four training observations by roughly forty visits. If similar misses recur on fresh data, the model may lack the information or flexibility to represent the pattern. A season indicator could produce fitted means of 60 and 140 on these four observations.

Bare and leafy miniature trees alternate on a plinth.
A flat prediction can miss a recurring seasonal change even in the training observations.

What else could explain poor training results?

An unsuccessful optimization run, mislabeled records or a feature that never reaches the model can produce similar symptoms. Check the data and fitting procedure, then compare the seasonal model on independent periods. A lower training error alone cannot establish better forecasts.

Follow the idea

Overfitting · Compare a model that follows sample-specific noise.

Regression · Read a forecast’s errors in the units of the target.

Source · Scikit-learn underfitting and overfitting example

Return to Underfitting in the A–Z glossary