Skip to main content

Πώς να υπολογίσετε το Confusion Matrix

Τι είναι το Confusion Matrix;

Creates confusion matrix showing actual vs. predicted classifications. Basis for evaluation metrics.

Τύπος

Accuracy = (TP+TN) / total
TP
TN/(TN+FP) — TN/(TN+FP)
TN
TN value — Variable used in the calculation

Οδηγός βήμα προς βήμα

  1. 14 cells: TP (correct positive), FP (false positive), FN (false negative), TN (correct negative)
  2. 2Accuracy = (TP+TN) / total
  3. 3Sensitivity/Recall = TP/(TP+FN), Specificity = TN/(TN+FP)
  4. 4Precision = TP/(TP+FP)

Worked Examples

Εισαγωγή
TP/FP/TN/FN
Αποτέλεσμα
Metrics calc

Common Mistakes to Avoid

  • Using accuracy for imbalanced data (wrong)
  • Confusing sensitivity and specificity
  • Not balancing precision/recall tradeoff

Frequently Asked Questions

When use different metrics?

Accuracy: balanced classes; precision: minimize false positives; recall: minimize false negatives.

What about imbalanced classes?

Accuracy misleading; use precision, recall, F1-score, or AUC instead.

Είστε έτοιμοι να υπολογίσετε; Δοκιμάστε τον δωρεάν υπολογιστή Confusion Matrix

Δοκιμάστε το μόνοι σας →

Ρυθμίσεις