How to give three different color scheme (cmap value) to sklearn heatmap confusion matrix

Viewed 80

I have a 3* 3 confusion matrix (multilabel classification), I want to to give each row a different color(so that each class can be easily distinguished based on color) How can I do this using sklearn heatmap function?

data=confusion_matrix(dt['Actual'], dt['Prediction'])
sns.heatmap(data,annot=True,cmap='BuGn',cbar= False)



enter image description here

0 Answers
Related