Skip to main content
ML Quest
Python Idle

Every prediction your classifier makes falls into one of four buckets: True Positive, False Positive, True Negative, or False Negative. These four numbers are the foundation of every classification metric — precision, recall, F1, specificity, you name it. Your mission: build a confusion matrix, extract the four counts, and calculate precision, recall, and F1 by hand. Then verify your math against sklearn. No shortcuts.

~20 minscenario1000 rows
Loading Python runtime...
Goals: 4 tests
confusion matrix should be a 2x2 array
TP, FP, TN, FN variables should exist
manual precision should match sklearn within 0.01
manual recall should match sklearn within 0.01
Python loading...