Comprehensive Calculator Guide
This calculator scores a classifier from its confusion matrix: F1, accuracy, precision, recall, specificity and the Matthews coefficient. A spam filter with 80, 20, 10, 890 has F1 = 0.842 and 97% accuracy.
Beyond accuracy
Precision asks how many flagged items were right, recall how many real positives were found; F1 balances them. On imbalanced data a do-nothing model can score high accuracy, so use F1 and MCC.
How to Use
- Enter TP and FP.
- Enter FN and TN.
- Press “Calculate” to see the metrics.
Formula Used
F1 = 2TP/(2TP + FP + FN) | MCC = (TP·TN − FP·FN)/√((TP+FP)(TP+FN)(TN+FP)(TN+FN))
Practical Examples
- Example 1
- 80, 20, 10, 890: F1 0.842, MCC 0.827.
- Example 2
- Always negative: accuracy 95%, F1 0.
Important Tips
- Check class balance first.
- Tune the threshold to the cost of errors.
- Use MCC for imbalanced classes.
Common Mistakes to Avoid
- Accuracy alone.
- Mixing up precision and recall.
- Testing on training data.
Frequently Asked Questions
- Precision vs recall?
- Right among flagged vs found among real.
- When F1?
- Rare positive class.
- Why MCC?
- It uses all four cells.