Overfitting
Overfitting is when a model learns the random noise in its training data as if it were real pattern, so it fits history closely and predicts new data badly.
Last reviewed
Mix models are prone to it, because they have many adjustable settings and few rows of data. The warning signs are a very high fit statistic, a large gap between training and holdout accuracy, and results that shift when a few weeks are added.
Its opposite, underfitting, is a model too simple to capture what's going on. Regularization, priors, and holdout testing are the standard defenses against overfitting.
- Topic
- Model quality and Bayesian methods
Related terms
- Regularization
- Regularization is a penalty added to a model's fitting process that discourages extreme coefficient values, trading a little fit for estimates that are more stable.
- Holdout validation
- Holdout validation sets aside part of the data, fits the model on the rest, and checks how well the model predicts the part it never saw.
- R-squared
- R-squared is the share of the variation in the outcome that a model accounts for, from 0 (none) to 1 (all).
- Degrees of freedom
- Degrees of freedom are the amount of independent information left in the data after a model has used some of it up to estimate its settings.
- Dummy variable
- A dummy variable is a column of ones and zeros that marks when something was true: a holiday week, a product launch, a site outage.
Go deeper
Want a second opinion?
Tell us what you're trying to decide and what data you have, and we'll tell you what we'd do. Or take the short readiness quiz first. It's a rough screen, not a verdict. Both open on the home page.