Accuracy, Precision, and Recall Explained in Plain English
Explaining the accuracy, precision, and recall metrics in Machine Learning.

If you’re learning about classification in machine learning, you have probably come into contact with these metrics. This article attempts to explain what these terms are in plain English.
Note: these metrics work only for classification, not regression.
Concept of True Positives, True Negatives, False Positives & False Negatives
We need to understand these 4 terms before we can understand the metrics.
- true positive (TP) → actual answer is true, we correctly predict as true
- true negative (TN) → actual answer is false, we correctly predict as false
- false positive (FP) → actual answer is false, we wrongly predict as true
- false negative (FN) → actual answer is true, we wrongly predict as false
Accuracy Score
Accuracy = no. correct predictions / all predictions
Accuracy = (TP + TN) / (TP + TN + FP + TN)
Accuracy → Out of all my predictions (both true and false), how many of them are correct
Precision Score
Precision = TP / (TP + FP)
Precision → Out of all my predictions that are true, how many of them are actually true
Recall Score
Recall = TP / (TP + FN)
Recall → Out of all the answers that are true, how many of them did I predict as true
Accuracy, Precision & Recall In Practice
Let’s say we have this set of answers and predictions:
answers = [1,1,1,1,1,0,0,0]
predict = [1,1,1,0,0,1,0,0]Accuracy is the proportion of answers that we predicted correctly. Out of 8 predictions, we predicted 5 of them correctly (3 true positives and 2 true negatives). Our accuracy score is hence 5/8 which is 62.5%
Precision is true positives / (true positives + false positives). Here, we predicted 4 positives. Out of these 4 predicted positives, 3 of them are actually positive. As such, our precision score is 3/4, which is 75%
Recall is true positives / (true positives + false ngatives). Here, there are 5 actual positives. Out of these 5 actual positives, we predicted 3 of them correctly. As such, our recall score is 3/5, which is 60%
Accuracy, Precision & Recall In Code
We can use sklearn's built-in functions to calculate the accuracy, precision, and recall score for us:
from sklearn.metrics import *answers = [1,1,1,1,1,0,0,0]
predict = [1,1,1,0,0,1,0,0]print("accuracy:", accuracy_score(answers, predict))
print("precision:", precision_score(answers, predict))
print("recall:", recall_score(answers, predict))The output:
accuracy: 0.625
precision: 0.75
recall: 0.6Note: when calling the score functions, remember to put the answers before the predictions.
Conclusion
If this article provided value and you wish to support me, do consider signing up for a Medium membership — It’s $5 a month, and you get unlimited access to articles on Medium. If you sign up using my link below, I’ll earn a tiny commission at zero additional cost to you.
Sign up using my link here to read unlimited Medium articles.
I write coding articles (once per 1–2 days) that would have probably helped the younger me speed up my learning curve. Do join my email list to get notified whenever I publish.
More content at PlainEnglish.io. Sign up for our free weekly newsletter. Follow us on Twitter and LinkedIn. Join our community Discord.





