Daily Dose of Data Science

Share this post

Use This Simple Technique To Never Struggle With TP, TN, FP and FN Again

www.blog.dailydoseofds.com

Use This Simple Technique To Never Struggle With TP, TN, FP and FN Again

Ask these two questions.

Avi Chawla
Apr 28, 2023
13
Share

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:

  1. Did the model get it right? Answer: yes (or True) / no (or False).

  2. 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.

  1. Did the model get it right? The answer is yes (or TRUE).

  2. 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”.

Exercise

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.

👉 Read what others are saying about this post on LinkedIn and Twitter.

👉 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!

Share Daily Dose of Data Science


Find the code for my tips here: GitHub.

I like to explore, experiment and write about data science concepts and tools. You can read my articles on Medium. Also, you can connect with me on LinkedIn and Twitter.

13
Share
Previous
Next
Comments
Top
New
Community

No posts

Ready for more?

© 2023 Avi Chawla
Privacy ∙ Terms ∙ Collection notice
Start WritingGet the app
Substack is the home for great writing