ML · Extended learning
ML confusion-matrix calculator
Compute named metrics from integer TP/FP/FN/TN counts and show the count chart.
Run the local exercise
Key results
| Metric | Value | Unit |
|---|---|---|
| Precision | 84% | |
| Recall | 77.8% | |
| F1 | 80.8% | |
| Accuracy | 90% |
- Precision and recall are N/A only when their denominators are zero; F1 is 0 when 2TP + FP + FN is positive and TP is zero.
Experiment steps
- Enter non-negative integer counts; decimals and non-finite values are rejected.
- Read Precision, Recall, F1, Accuracy, and the TP/FP/FN/TN count chart.
- Discuss offline metrics separately from business outcome, safety thresholds, and data representativeness.
Sources, formula, and limitations
Original synthetic integer counts; Precision = TP/(TP+FP), Recall = TP/(TP+FN), F1 = 2TP/(2TP+FP+FN), Accuracy = (TP+TN)/total.
Not from a trained model, test set, or online telemetry; metrics with zero denominators display as N/A.
Synthetic counts do not represent a real model, dataset, online risk, or business value.