
Learning the noise of the training sample; the reason a model that fits perfectly can predict badly.Overfitting occurs when a statistical model describes random error or noise instead of the underlying relationship. The model performs well on the training data but poorly on new, unseen data. This is a central problem in machine learning and statistics, as the goal is to build models that generalize, not just memorize.
The concept has been known since the early days of statistics and curve fitting. The term 'overfitting' became prominent in the 1960s–1970s with the rise of neural networks and decision trees.
Models with high flexibility (e.g., many parameters) can fit the training data almost perfectly, including its idiosyncrasies. When the model is too complex relative to the amount of data, it captures spurious patterns that do not exist in the true population. This leads to high variance: small changes in the training set cause large changes in the model. Techniques like cross-validation, regularization, and pruning are used to detect and prevent overfitting.
In predictive modeling, overfitting is a constant concern. Practitioners use validation sets and regularization to ensure models like those in credit scoring or medical prognosis remain reliable on new patients.
A model that perfectly memorizes the training data (e.g., a lookup table) has zero training error but typically performs no better than random guessing on new data—a classic example of overfitting.











