Why “accuracy” is a misleading metric in machine learning

Why accuracy can be high but a model still ineffective

GreekDataGuy
Analytics Vidhya
2 min readAug 24, 2019

--

We hear the term “accuracy” all the time when describing AI models. Especially in articles intended to excite the public.

I found an article on the front page of google about a model that detects retail thefts with 81% accuracy.

What most people don’t realize is that without the data supporting the 81%, we have no idea what that actually means.

A fictional example to illustrate my point

Imagine a startup developed an AI model that detects which people walking by on the street have offensively stinky feet. The model is 99.9998% accurate. Amazing right!?

Not so fast.

The math supporting my fictional example

Lets look at the data I used to generate that 99.9998%.

Participants in total: 1,000,000
Participants with stinky feet: 2
Participants without stinky feet: 999,998

The model predicted that 0 people had offensively stinky feet (it always predicts this btw). So was correct 999,998 times and incorrect 2 times.

Giving us a model accuracy of… 999,998/1,000,000 = 99.9998%.

Great model? Not if it had been really really really important to detect those people with stinky feet.

In conclusion

Had we looked at accuracy on positive and negative cases separately we would have seen 100% (999,998 / 999,998) accuracy on positive cases and 0% (0 / 2) accuracy on negative cases. Highlighting the importance of not taking “accuracy” at face value.

The lesson here is especially relevant for any models that claim to predict rare events.

The technology in the article at the top could be amazing. But we really don’t know when all we have is “accuracy”. Stay skeptical my friends.

--

--