Discover more from Daily Dose of Data Science
Use This Simple Technique To Never Struggle With TP, TN, FP and FN Again
Ask these two questions.
Do you often struggle to label model predictions as TP, TN, FP and FN, and comprehend them? If yes, here's a simple guide to help you out.
When labeling any prediction, ask yourself two questions:
Did the model get it right? Answer: yes (or True) / no (or False).
What was the predicted class? Answer: Positive/Negative.
Next, combine the above two answers to get the final label.
For instance, say the actual and predicted class were positive.
Did the model get it right? The answer is yes (or TRUE).
What was the predicted class? The answer is POSITIVE.
Final label: TRUE POSITIVE.
As an exercise, try labeling the following predictions. Consider the “Cat” class as “Positive” and the “Dog” class as “Negative”.
Let me know your answer in the comments :)
Thanks for reading Daily Dose of Data Science! Subscribe for free to learn something new and insightful about Python and Data Science every day. Also, get a Free Data Science PDF (250+ pages) with 200+ tips.
👉 If you liked this post, don’t forget to leave a like ❤️. It helps more people discover this newsletter on Substack and tells me that you appreciate reading these daily insights. The button is located towards the bottom of this email.
👉 If you love reading this newsletter, feel free to share it with friends!
Find the code for my tips here: GitHub.