AI & ML · Concept
Confusion Matrix
A confusion matrix is a table that compares true and predicted class labels. Its diagonal shows correct predictions; other cells show classification errors between categories.
Last updated
Syntax
confusion_matrix(y_true, y_pred, labels=None)In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
classification_reportaccuracyprecisionrecallf1-scoreplot_confusion_matrix