Use this tool when you have a classifier or diagnostic test and want to see how often it is right and wrong. Enter the counts or paste predicted and actual labels, read accuracy, sensitivity, specificity, precision, F1 and Cohen’s kappa, edit the figure colours, text and line width, and download the results as pictures or one APA 7 Word file.
About the confusion matrix
A confusion matrix is a table that crosses the predicted class with the actual class. The diagonal holds the correct predictions and the other cells hold the errors, so it shows not only how accurate a model is but which kind of mistake it makes.
When to use it
Use it to evaluate machine-learning classifiers, medical or diagnostic tests, quality-control inspections and any rater or method that assigns cases to categories. It works for two classes and for several classes.
What this tool offers
Counts for every predicted and actual class, with row or column percentages.
Accuracy, sensitivity (recall), specificity, precision, F1 and Cohen’s kappa with confidence intervals.
Colour, text colour, text size and line width controls, plus a thicker-lines button.
APA7-style table, caption and results paragraph.
Download as PNG or as a combined Word (.docx) file after a free sign up or log in.
Assumptions to check
Predicted and actual labels refer to the same cases.
Accuracy can mislead when classes are very unbalanced, so read it together with sensitivity and precision.
Evaluate on data that was not used to train the model.
How to report it in APA7
Report the number of cases, the classes, and the main metrics with their confidence intervals, and refer to the matrix as Figure 1 or Table 1. The generator writes the text, the table and the figure note for you.
Frequently asked questions
Is the confusion matrix generator free?
Yes. You can build the matrix and read the metrics without an account. Create a free account or log in only to download.
What is the difference between sensitivity and precision?
Sensitivity is the share of actual positives that were found. Precision is the share of predicted positives that were correct.
Is my data uploaded to a server?
The calculation runs in your browser. Your data stays on your device.