Based on your code it seems that you are creating a “standard” confusion matrix, which shows the confusion between every two classes. For a multi-label classification you might want to check e.g. sklearn.metrics.multilabel_confusion_matrix 13.