confusion-matrix · shipping · also classification confusion matrix

Confusion matrix

A confusion matrix tabulates predicted labels against observed labels for a specified set of classification decisions.

Related Observatory article: Read on hesela.com

Axis labels matter: scikit-learn places observed classes in rows and predictions in columns, while Fawcett's Figure 1 uses the transposed convention. With rows = observed, columns = predicted and class order [0, 1], the binary matrix is [[TN, FP], [FN, TP]], where 1 is the positive class. [1] [2]

Keep raw counts alongside normalized values. Row normalization conditions on the observed class, column normalization on the predicted class, and whole-matrix normalization on all included observations. A 2-by-2 array without its class order and axis convention is ambiguous. [1]

For drive prediction, specify the failure label, prediction horizon, threshold and observation unit. A matrix of daily decisions is not a count of distinct drives or replacement actions. Unresolved outcomes must not silently become healthy labels; retain the exclusion and follow-up rules. This is an application of the counting definition, not a performance claim. [2]

In a synthetic 10,000-decision example, [[9801, 99], [10, 90]] yields 90 true alerts, 99 false alerts and 10 missed positives. The negative-class denominator is 9900; the alert denominator is 189. [3]

Relations

related
Specificity, Balanced accuracy, Precision, Recall, False positive rate, Prediction horizon, Prediction cadence

Citations

  1. scikit-learn: confusion_matrix; axis conventions, label order and normalization. (accessed 2026-11-22)
  2. Fawcett (2006). An introduction to ROC analysis, section 2 and Figure 1. DOI: 10.1016/j.patrec.2005.10.010. (accessed 2026-11-22)
  3. Hesela: synthetic classification counts, exact fractions and edge-case checks. (accessed 2026-11-22)
Sources & caveats
  • Reviewed 2026-11-22: Fawcett section 2 and Figure 1, plus the confusion_matrix API documentation.
  • Storage-specific reporting guidance is Hesela's application of the counting definition. Worked counts are synthetic, with exact rational checks.

JSON: /data/terms/confusion-matrix.json

Published by Hesela team · Updated

Report a correction · Editorial standards · Reuse guidance

Cite this page
Hesela team. Confusion matrix. Hesela. 2026-11-22. https://hesela.dev/terms/confusion-matrix/