Junior — Middle
What binary classification metrics do you know? The pros and cons of each.
sobes.tech AI
Answer from AI
Main metrics of binary classification:
-
Accuracy
- The proportion of correctly classified objects.
- Plus: simple and intuitive.
- Minus: performs poorly with imbalanced classes.
-
Precision
- The proportion of true positives among all predicted positives.
- Plus: important when false positives are critical.
- Minus: does not account for missed positives.
-
Recall
- The proportion of true positives found by the model out of all actual positives.
- Plus: important when missing positives is critical.
- Minus: can be high with many false positives.
-
F1-score
- Harmonic mean of Precision and Recall.
- Plus: balances between accuracy and completeness.
- Minus: does not consider true negatives.
-
ROC AUC
- Measures the model's ability to distinguish between classes at different thresholds.
- Plus: threshold-independent.
- Minus: may be less informative with strong imbalance.
-
Confusion Matrix
- Shows TP, FP, TN, FN for detailed analysis.
The choice of metric depends on the task and which errors are more critical — misses or false alarms.