Open Agent School · Public worked example
Overfitting: meaning and example
Welcome! Take one idea with you today.
Overfitting happens when a model adapts too closely to details of the training data that do not transfer to new examples. It may learn useful structure and accidental noise together. The warning is not simply a complicated model; it is poor generalization relative to its training performance.
Picture it: You have twelve invented days of cafe sales. One rainy day included a large private event. A flexible curve can pass through every point, including that unusual spike. Your job is to predict ordinary future days, not draw the prettiest line through last week.
What is easy to mix up?
It proves agreement with the training examples under that metric. Readiness requires independent examples, important failure cases, and acceptable consequences when predictions are wrong.
Teaching example by Open Agent School. Source: scikit-learn - Cross-validation and overfitting.