Do you struggle to classify predictions as one of TP, TN, FP, and FN?
If yes, here’s a simple technique I recommend using.
A video version of this technique is available at the top.
If you prefer reading...let’s dive in below.
When labeling any binary classification prediction, ask two questions:
Question 1) Did the model get it right?
The answer will be either Yes or No.
Yes means True.
No means False.
Question 2) What was the predicted class?
The answer will be either Positive or Negative.
Next, just combine the above two answers to get the final label.
For instance, say the actual and predicted class were positive.
Question 1) Did the model get it right?
Answer: Yes, which means TRUE.
Question 2) What was the predicted class?
Answer: POSITIVE.
The final label: TRUE POSITIVE.
Simple, right?
The following visual summarizes this:
As an exercise, complete the table below.
Consider:
The cat class → Positive.
The dog class → Negative.
Let me know your answers.
👉 Over to you: Do you know any other techniques to label binary classification predictions?
Thanks for reading!
P.S. For those wanting to develop “Industry ML” expertise:
At the end of the day, all businesses care about impact. That’s it!
Can you reduce costs?
Drive revenue?
Can you scale ML models?
Predict trends before they happen?
We have discussed several other topics (with implementations) in the past that align with such topics.
Here are some of them:
Learn sophisticated graph architectures and how to train them on graph data: A Crash Course on Graph Neural Networks – Part 1.
So many real-world NLP systems rely on pairwise context scoring. Learn scalable approaches here: Bi-encoders and Cross-encoders for Sentence Pair Similarity Scoring – Part 1.
Learn techniques to run large models on small devices: Quantization: Optimize ML Models to Run Them on Tiny Hardware.
Learn how to generate prediction intervals or sets with strong statistical guarantees for increasing trust: Conformal Predictions: Build Confidence in Your ML Model’s Predictions.
Learn how to identify causal relationships and answer business questions: A Crash Course on Causality – Part 1
Learn how to scale ML model training: A Practical Guide to Scaling ML Model Training.
Learn techniques to reliably roll out new models in production: 5 Must-Know Ways to Test ML Models in Production (Implementation Included)
Learn how to build privacy-first ML systems: Federated Learning: A Critical Step Towards Privacy-Preserving Machine Learning.
Learn how to compress ML models and reduce costs: Model Compression: A Critical Step Towards Efficient Machine Learning.
All these resources will help you cultivate key skills that businesses and companies care about the most.
Share this post