Glossary · Data Science & AI
Overfitting
Also called: overfit · memorizing noise
When a model learns the noise and quirks of its training data so closely that it performs poorly on new data.
Definition
Overfitting happens when a model is flexible enough to fit random fluctuations in the training sample as if they were real patterns. The telltale sign is a large gap between excellent training performance and much weaker performance on held-out data. It is more likely with many predictors relative to observations, very flexible algorithms, or repeated tweaking of a model against the same test set. Standard defenses include simpler models, regularization, more data, early stopping and honest evaluation with cross-validation or a test set used only once.
Worked example
Try it in a tool
Related terms
- Bias-Variance Tradeoff: The tension between models too simple to capture real patterns (high bias) and models so flexible they chase noise (high variance).
- Cross-Validation: Estimating how well a model will predict new data by repeatedly training on part of the data and testing on the part held out.
- Adjusted R-Squared: R-squared corrected for the number of predictors, so adding a variable that explains little lowers it instead of always raising it.
- Machine Learning: Methods that let computers learn patterns from data to make predictions or decisions without being explicitly programmed with rules.
- Supervised Learning: Machine learning that trains a model on examples with known answers (labels) so it can predict the answer for new cases.