Search for a tool
Confusion Matrix

Tool to calculate statistical data (sensitivity, specificity, precision, predictive value, etc.) from true positives, true negatives, false positives, false negatives values, also called confusion matrix.

Results

Confusion Matrix -

Tag(s) : Data Processing

Share
Share
dCode and more

dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!


Please, check our dCode Discord community for help requests!
NB: for encrypted messages, test our automatic cipher identifier!


Feedback and suggestions are welcome so that dCode offers the best 'Confusion Matrix' tool for free! Thank you!

Confusion Matrix

Confusion Matrix

True Positive (TP) : item declared TRUE, and in reality TRUE


False Positive (FP) or Type I error: item declared TRUE but in reality FALSE


True Negative (TN): item declared FALSE, and in reality FALSE


False Negative (FN) or Type II error: item declared FALSE but in reality TRUE


Answers to Questions (FAQ)

What is a confusion matrix? (Definition)

A confusion matrix, also called an error matrix, is an evaluation tool often presented as a table of 4 boxes containing 4 essential values to statistically measure/evaluate a result. Generally, from a classification model and/or an artificial intelligence algorithm.

The 4 values are:

— the number of true positives (TP): the number of observations correctly predicted as positive.

— the number of false positives (FP): the number of actual negative observations incorrectly predicted as positive.

— the number of true negatives (TN): the number of observations correctly predicted as negative.

— the number of false negatives (FN): the number of actual positive observations incorrectly predicted as negative.

Example: TP:99,FP:1,TN:95:FN:5

How to evaluate a confusion matrix?

The 4 values of the confusion matrix make it possible to calculate many other values of statistical interest:

— the rate of true TPR positives, also called sensitivity or recall, TPR = TP / (TP + FN)

— the rate of true FPR negatives, also called specificity, FPR = TN / (FP + TN)

— the positive predictive value, also called precision, PPV = TP / (TP + FP)

— the negative predictive value, NPV = TN / (TN + FN)

— the rate of false positives, FPR = FP / (FP + TN)

— the rate of false negatives, FNR = FN / (FN + TP)

— the rate of false discoveries, FDR = FP / (FP + TP)

— the rate of false omissions, FOR = FN / (FN + TN)

In addition, additional indicators can be useful such as accuracy or F1 score.

How does the Confusion Matrix help improve models?

By providing a detailed view of classification errors, the Confusion Matrix helps to understand the strengths and weaknesses of the model, thus strengthening the interpretability of the results.

Source code

dCode retains ownership of the "Confusion Matrix" source code. Any algorithm for the "Confusion Matrix" algorithm, applet or snippet or script (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or any "Confusion Matrix" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) or any database download or API access for "Confusion Matrix" or any other element are not public (except explicit open source licence like Creative Commons). Same with the download for offline use on PC, mobile, tablet, iPhone or Android app.
Reminder: dCode is an educational and teaching resource, accessible online for free and for everyone.

Cite dCode

The content of the page "Confusion Matrix" and its results may be freely copied and reused, including for commercial purposes, provided that dCode.fr is cited as the source. Exporting the results is free and can be done simply by clicking on the export icons ⤓ (.csv or .txt format) or ⧉ (copy and paste).
To cite dCode.fr on another website, use the link: https://www.dcode.fr/confusion-matrix
In a scientific article or book, the recommended bibliographic citation is: Confusion Matrix on dCode.fr [online website], retrieved on 2025-04-16, https://www.dcode.fr/confusion-matrix

Need Help ?

Please, check our dCode Discord community for help requests!
NB: for encrypted messages, test our automatic cipher identifier!

Questions / Comments

Feedback and suggestions are welcome so that dCode offers the best 'Confusion Matrix' tool for free! Thank you!


https://www.dcode.fr/confusion-matrix
© 2025 dCode — The ultimate collection of tools for games, math, and puzzles.
 
Feedback