Back to problems

Optimize precision–recall under class imbalance

Algorithm · Amazon · Medium

Assume a prediction is positive when score >= threshold. Also note: the 12 scored examples contain 3 actual positives (A, E, I), so the sample positive rate is $$3/12 = 25\%$$. The $$1\%$$ positive rate is population context for interpretation. 1. Precision, recall, and F1 Threshold Predicted positives TP FP FN Precision Recall F1 0.90 A, B 1 1 2 $$1/2 = 0.500$$ $$1/3 \approx 0.333$$ $$0.400$$ 0.60 A, B, C, D, E 2 3 1 $$2/5 = 0.400$$ $$2/3 \approx 0.667$$ $$0.500$$ 0.50 A,…

Checking your access…