THE RULE
Hold some data back
scikit-learn's guide calls training and testing on the same data a methodological mistake: a model that just repeats labels it has seen would score perfectly and predict nothing useful.
Check a set-up
HOW MODELS ARE CHECKED
UNSEEN DATA the only fair test
AI-generated image, not a photograph of a real person or place.
Every machine learning model is trained on examples, then marked on how well it does.
The catch is which examples it is marked on. Standard practice splits the data into a training set, a validation set and a test set the model never learns from, so the score reflects new data, not memory.
THE SHORT ANSWER
Three ideas from standard machine learning guidance,
in plain English.
THE RULE
scikit-learn's guide calls training and testing on the same data a methodological mistake: a model that just repeats labels it has seen would score perfectly and predict nothing useful.
Check a set-upTHE TEST SET
Google's course advises tuning on a validation set and using the test set to double-check. Both sets wear out with repeated use, so fresh data helps.
The workflowLEAKS
Data leakage is when information not available at prediction time is used to build the model. It gives overly optimistic scores and poorer results on genuinely new data.
See the numbers
A FAIR WORKFLOW IN FOUR STEPS
These steps follow the scikit-learn user guide and Google's Machine Learning Crash Course. They apply whether the model is a small classifier or something much larger.
Divide the data into training, validation and test sets, and delete test or validation examples that duplicate training ones.
Fit scaling, imputation or feature selection on the training set, then apply the same transformation to the other sets.
Compare settings on the validation set, or average scores across k folds of the training data.
Use the test set for the final check, and collect new data to refresh it when it has been used too often.
TWO NUMBERS WORTH KNOWING
One finding from rebuilding a famous test set,
one from a survey of leakage in science.
11–14%
Accuracy drop on a freshly built ImageNet test set
Researchers rebuilt the ImageNet and CIFAR-10 test sets following the original methods. A broad range of models lost 11% to 14% accuracy on the new ImageNet set and 3% to 15% on CIFAR-10.
NEW TEST SETS · RECHT ET AL. 2019
329 papers
Papers in 17 fields where leakage errors were found
A survey of research fields that adopted machine learning found errors across 17 fields affecting 329 papers, in some cases leading to wildly over-optimistic conclusions.
LEAKAGE · KAPOOR & NARAYANAN
Recht and colleagues found that models which gained accuracy on the original test sets still gained more on the new ones, and put the drops down to slightly harder images rather than to reuse of the old sets.
A QUICK SET-UP CHECK
Pick a way of testing a model to see what the guidance says about it. The bar shows how likely the score is to be over-optimistic.
Based on the scikit-learn user guide and Google's Machine Learning Crash Course. General information about evaluation practice, not a review of any product.

WHY BIG MODELS NEED THIS
A 2017 study found that image networks trained in the usual way easily fit training data whose labels had been randomly shuffled, and even pure random noise. A perfect training score proves very little.
The same study notes that the number of parameters usually exceeds the number of data points. That is why the score that matters is the one on data the model was never trained on.
In conversation
The validation set is used during development to compare settings and catch problems. The test set is kept back for a final check, so it gives a cleaner estimate of performance on new data.
It is when a model fits the examples it was trained on so closely that it does poorly on new ones. scikit-learn's guide gives the extreme case of a model that just repeats labels it has seen.
The training data is split into k parts. The model is trained on k minus one parts and checked on the remaining one, k times over, and the scores are averaged. A separate test set is still held back.
Using information that would not be available at prediction time when building the model, for example fitting preprocessing on all the data before splitting it. It makes scores look better than they really are.
Yes. Google's course says the more you use the same data to make decisions about a model, the less confidence you can have that it will do well on new data, and suggests collecting more data to refresh it.
Each figure on this page comes from the sources below.
ABOUT THIS NAME
aitraintech.com is part of the DoodleSale portfolio. It isn't in an auction right now, but you can ask about leasing it.