WRITE · TRACE · UNDERSTAND
Confusion Matrix
Rows are actual labels and columns are predicted labels.
Your experiment
confusion(actual, predicted, classes) returns a classes by classes count matrix. Labels are integers from 0 to classes-1; input lengths match.
Python runs in your browser. Your draft stays on this device.
What to look for
Rows are actual labels and columns are predicted labels. Trace each sample into its cell, including mistakes hidden by accuracy.
Watch your code work
Ready to experimentWrite a solution or load the worked answer, then choose Trace & check.
Step through arrays, variables and training curves produced by your own Python.