Precision, recall, and threshold tradeoffs — step 5 of 7
An AI wrote this precision function but used recall's denominator by
mistake: it divides by tp + fn (the missed fraud) instead of
tp + fp (the false alarms). Precision is about what we flagged, so
it must use the false positives. Fix line 3.
Expected output:
precision=0.67
The break is on line 3 — but read the whole snippet first.