A model’s ability to fit known data is not the same as its ability to predict new data. A sufficiently flexible method can learn noise, accidental details or information that would not be available at prediction time. The repair is to preserve genuinely unseen cases and evaluate the model on the job it will actually perform.
This applies to statistical models, machine learning, trend lines and even informal rules students invent from examples. The more a method is adjusted to the observed cases, the more important independent testing becomes.
The perfect training score that collapses tomorrow
Imagine a fictional prediction system built from twenty historical cases. After repeated adjustments, it classifies all twenty correctly. The team announces 100 percent accuracy.
That statement is accurate about the cases used to construct and tune the system. It does not establish 100 percent accuracy on future cases.
If the model has learned quirks unique to those twenty observations, new data can expose the gap immediately.
Training performance answers an easier question
Training data have influenced the model. Good performance there asks whether the method can fit information it has already used.
Prediction asks something harder: can the learned relationship transfer to observations that did not participate in fitting or tuning?
Keep these results separately labelled. “Training accuracy” should not silently become “accuracy”.
More flexible models can fit more noise
Draw two points and many curves can pass through them. Add more points and a sufficiently complicated curve can still be constructed to hit every one. Exact interpolation does not prove that the wiggles correspond to a stable process.
Overfitting occurs when the model captures idiosyncrasies of the observed sample that do not generalise well. The problem is not complexity by itself; complex relationships can be real. The issue is complexity unsupported by transferable signal.
Compare performance on data not used to choose that complexity.
Repeatedly checking the test set can turn it into training information
Suppose the team evaluates on a held-out set, changes the model after seeing the result, evaluates again, changes it again, and repeats this twenty times.
The holdout has now influenced model selection. Even if its rows were never directly used in the fitting algorithm, information from its performance has leaked into development decisions.
Use validation data for model choice and preserve a final test set for a less-contaminated evaluation, or use an appropriate resampling design. The exact workflow depends on data size and modelling context.
Leakage can make prediction look impossibly good
Data leakage occurs when model inputs contain information that would not legitimately be available at the time the prediction is meant to be made.
For example, predicting whether an assignment will be late using a field recorded only after submission would create a misleadingly powerful model. The feature contains information from the future relative to the intended prediction point.
Split data according to the real decision process, not merely by random rows when time or grouped identities make that inappropriate.
Repeated observations can leak identities across the split
If the same student contributes many nearly identical records, placing some in training and some in testing can make the test easier than predicting for a genuinely new student.
Whether this is a problem depends on the intended job. If the system will predict future observations for known students, within-student information may be legitimate. If it must generalise to unseen students, the evaluation should reflect that target.
The unit of splitting must match the unit of generalisation.
Distribution shift can defeat a well-tested model
A model can perform well on a proper historical test and still degrade when the environment changes. New curricula, user behaviour, sensors, definitions or populations can alter the relationship learned from earlier data.
This does not prove the original evaluation was dishonest. It means generalisation was conditional on the data-generating process remaining sufficiently similar.
Monitor relevant changes after deployment and re-evaluate when the operating context moves outside the conditions represented by the original evidence.
A high score can optimise the wrong metric
Accuracy can be misleading when one class dominates. If 99 percent of cases are negative, predicting negative every time gives 99 percent accuracy while identifying none of the rare positives.
Choose evaluation measures according to the decision and error costs. Precision, recall, calibration, mean absolute error and other measures have different jobs.
The companion Goodhart’s-law article explains why a convenient metric should not replace the underlying objective.
Simple baselines prevent impressive uselessness
Compare the model with a simple alternative: previous value, group mean, majority class or another domain-appropriate baseline.
A complicated system that scores 91 percent may sound impressive until a trivial baseline scores 92 percent. The relevant question is improvement over an appropriate alternative, not sophistication of the machinery.
Baselines also help detect data leakage: implausibly large gains deserve investigation before celebration.
The repair routine
Define the future prediction job first. Decide which information will genuinely be available then. Split or resample data in a way that respects time, groups and the intended unit of generalisation.
Use training data to fit, validation information to choose among alternatives, and preserve independent evaluation where feasible. Compare with simple baselines and report uncertainty rather than only the best score.
After deployment, monitor whether the population or measurement process changes. A model validated yesterday is evidence about yesterday’s conditions, not a permanent guarantee.
For the deeper modelling route, continue through Residuals, Outliers and Anomalous Data and the Mathematics Article Directory.
A model earns trust not by remembering the past beautifully, but by surviving a fair encounter with information it did not get to rehearse.
