How to tell if a model's accuracy is real
Why the accuracy reported for a predictive model is often too optimistic, five checks that reveal it, and what to ask before you rely on the model.
A model that scores 95% in a presentation can do much worse on next month’s data. Usually nobody is cheating. The figure was simply measured in a way that flatters the model. These five checks tell you whether a reported accuracy will hold once the model is in use.
1. Was it measured on data the model never saw?
Accuracy measured on the training data says very little, because the model has already seen those cases. Ask for results on held-out data that played no part in training, tuning or choosing the features.
2. Was the test data also used to choose the model?
Teams often try many models and settings and keep the one with the best test score. That winning score is biased upwards, because part of it is luck. Nested cross-validation, or a statistical correction of the selected score, gives a realistic figure.
3. Did information leak into the model?
Leakage happens when a feature contains information that will not exist when the model makes a real prediction. A “cancellation date” field in a model that predicts cancellations is an obvious example. A subtle one is scaling or filling in missing values using the whole dataset before it is split. For data that changes over time, the model must be trained on the past and tested on a later period.
4. Is there a confidence interval?
With 200 test cases, a measured accuracy of 85% could really be anywhere from about 80% to 90%. A single number without an interval hides that uncertainty. Two models whose intervals overlap may not differ at all.
5. Is the metric the right one, and is there a baseline?
If 95% of customers never cancel, a model that predicts “nobody cancels” is 95% accurate and useless. Compare the model with a simple baseline and use a measure that fits the problem, such as balanced accuracy, the area under the ROC curve or the cost of each type of error.
What to ask before you rely on a model
- Which data was the figure measured on, and was it kept apart from all training and tuning?
- How many models and settings were tried before the final one was chosen?
- What is the confidence interval of the main metric?
- How does the model compare with a simple baseline?
- Which features drive the predictions, and do they make sense to someone who knows the business?
If a model is already in use and these answers are missing, a model audit checks how accurate it really is and why it decides as it does. For a new model, our predictive analytics package reports every accuracy figure with a confidence interval and an explanation of what drives each prediction.
Last updated:
Have a project in mind?
Tell us what you want to achieve. We reply in writing to every request.