How to write horizontal label properly in confusion matrix?

Viewed 153

I am using the following code snippet for plotting confusion matrix using sklearn lib.

from sklearn.metrics import confusion_matrix,ConfusionMatrixDisplay   
cm=confusion_matrix(y_test,y_pred,normalize='true')
        
disp=ConfusionMatrixDisplay(confusion_matrix=cm,display_labels=['anger','bordome','disgust','fear', 'happiness','sadness' ,'neutral'])

and the result is given below: enter image description here

1 Answers
Related