EP01_02 — 📊 Predictive Performance — ML Metrics in CV
1.18.5 EP01_02 📊 Predictive Performance — ML Metrics in CV
In this activity, you will dive into the world of Machine Learning. Your goal is to evaluate the performance of a binary classifier by calculating metrics from a Confusion Matrix.
1.18.5.1 🧠 Why does the right metric matter?
Imagine a R$ 1.00 coin detector. The impact of the error defines the priority metric:
Metric
Practical Example
Importance in IP/CV
Accuracy
Grain Counting
Useful when classes are balanced (e.g., half of the grains defective, half healthy).
Precision
Security/Biometrics
Crucial to avoid False Positives (e.g., not allowing an impostor to access a system due to recognition errors).
Sensitivity
Health (Tumors)
Crucial to avoid False Negatives (e.g., not letting a tumor go unnoticed in an X-ray examination).
F1-score
Banknotes
Ideal for a balance between not rejecting genuine notes and not accepting counterfeit ones.
1.18.5.2 📊 The Confusion Matrix
Predicted Positive
Predicted Negative
Actual Positive
TP (True Positive)
FN (False Negative)
Actual Negative
FP (False Positive)
TN (True Negative)
Task:
Read 4 integer values in the order: TP, FN, FP, TN.