The Precision-Recall Trade-off Game: Spam Filter
Precision0.00
Recall0.00
Score0
Confusion Matrix
Pred Spam
Pred Ham
Actual Spam
Actual Ham
Scoring Rules
• Correctly caught spam (TP): +5 pts
• Correctly ignored ham (TN): +1 pt
• Blocked real email (FP): -3 pts
• Missed spam (FN): -10 pts
Your Goal: Maximize the score. Each dot is an email. Blue dots are real emails (ham), and red dots are spam. The line is your filter's threshold. Everything to the right of the line is classified as spam. Notice how trying to catch all the spam (high Recall) can cause you to block real emails (lowering Precision). Find the sweet spot!