Skip to main content
Interactive 3D/Confusion Matrix & ROC Curve
Confusion Matrix
N = 100 samples
Presets
Cell Counts
TP (True Pos)45
FP (False Pos)10
FN (False Neg)10
TN (True Neg)35
Threshold (ROC marker)
Threshold0.50
Metrics
Accuracy80.0%
Precision81.8%
Recall81.8%
F1 Score81.8%
Specificity77.8%
AUC0.811
Recall matters when missing a positive is costly (e.g. cancer detection).

Precision matters when a false alarm is costly (e.g. spam filters).

Confusion Matrix & ROC Curve - Interactive Visualization

A confusion matrix breaks every prediction into four buckets: true positives, false positives, true negatives, and false negatives. By dragging the decision threshold, you can see exactly how precision and recall trade off - and how that tradeoff traces out the ROC curve. The AUC (area under the ROC curve) gives a threshold-independent measure of classifier quality.

  • Understand TP, FP, TN, FN with live counts as you move the classification threshold
  • See precision and recall move in opposite directions as threshold shifts - the core tradeoff every ML engineer faces
  • Watch the operating point trace the ROC curve and understand what AUC = 0.5 vs 1.0 means
  • Learn when to optimize for precision (spam filter) vs recall (cancer screening)
  • F1 score combines precision and recall into one metric - see exactly when it peaks

Part of the EngineersOfAI Interactive 3D - free interactive visualizations covering every major concept in machine learning and AI engineering. Hover any element for a plain-English explanation. No code required.