简体   繁体   English

Sklearn混淆矩阵:更改colobar

[英]Sklearn Confusion Matrix: Change colobar

I think the answer should be super simple, but I'm not finding an immediate solution to the problem.我认为答案应该非常简单,但我没有立即找到解决问题的方法。 I have a confusion matrix, and I'd like to change colors to just blue colors (grade type).我有一个混淆矩阵,我想将颜色更改为蓝色(等级类型)。

Is it possible to do this in a simple way, using "colobar"?是否可以使用“colobar”以简单的方式做到这一点?

plot_confusion_matrix(clf_LR9, X1_test, y1_test) plot_confusion_matrix(clf_LR9,X1_test,y1_test)

在此处输入图片说明

Tks in advance提前确认

您应该将cmap参数设置为"Blues"

plot_confusion_matrix(clf_LR9, X1_test, y1_test, cmap="Blues")

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM