A beginner’s guide to Understanding Classification Metrics

Jino Rohit
3 min readJul 13, 2021

--

Picture Credit — https://www.inc.com/scott-mautz/3-actions-that-tip-scales-move-you-from-failure-to-success.html

Every time someone asks me to explain the difference between accuracy, precision and recall, I end up confusing them and confuse myself in the process, just like my teachers at college who send the kids for a spin around the globe for asking a simple doubt(I hope they don’t read this). So I figured,
why not break it down into pieces and conquer them one by one ? :)

Accuracy

Hmmm… What is accuracy? Easy!

If I get 9 marks out of 10 , then my accuracy is 9/10 = 0.9

Don’t get too excited , hold up.. is accuracy always enough to evaluate your
model and most importantly the problem you’re trying to solve?
How about predicting if someone has covid-19 and say your model has 99% accuracy?
Sounds fine right? But what about the 1% of the prediction gone wrong? I mean all it took was for one person to spread the virus to the entire globe right?

This is when we should care about Precision and Recall.

For this section , it would be more useful if you remember four terms,
True Positive, False Positive, True Negative, False Negative
This is how I remember it, assign True/False for the model’s correctness(True means the models done a great job, False means otherwise) and
Positive/Negative for the model’s predicted class. Confusing? I gotchu

True Positive -This is when the actual value is True and model predicts True
True Negative-This is when the actual value is False and the model predicts False

False Positive -This is when the actual value is False and model predicts True
False Negative-This is when the actual value is True and model predicts False

Back to Precision and Recall

Huh? What’s this now? Look closely and recollect the 4 key terms.
Precision simply tell us out of the total positive values in the dataset,
how many times our model has predicted positive. Precise !
This metric is used best where a lot of false positive predictions can hurt us.
Like spam detection!, where a precision score of 90% means that when it predicts a spam, it is 90% correct.
If a non-spam is identified as spam, the person loses his important mails :( . So get your precision higher !

I’ll let you guess this one…

Exactly! Recall is the efficiency with which it correctly predicts the True Positives.
Intuitively, during a covid test, among everyone who has covid, recall tells us how many were correctly identified having covid. This metric can go best with medical testing and so on, where you cannot afford to miss someone
who is actually affected and risk his life .

I hope this article clears up a lot of confusions about these metrics and if
you still need some help, let me know in the comments and I’ll do my best to
help you out :D

--

--

Jino Rohit
Jino Rohit

Written by Jino Rohit

Neurons that fire together, wire together

No responses yet