【问题标题】:Sklearn Confusion Matrix: Change colobarSklearn混淆矩阵:更改colobar
【发布时间】:2021-09-29 21:29:24
【问题描述】:

我认为答案应该非常简单,但我没有找到立即解决问题的方法。我有一个混淆矩阵,我想将颜色更改为仅蓝色(等级类型)。

是否可以使用“colobar”以简单的方式做到这一点?

plot_confusion_matrix(clf_LR9, X1_test, y1_test)

提前通知

【问题讨论】:

标签: python scikit-learn confusion-matrix


【解决方案1】:

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

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

【讨论】:

    猜你喜欢
    • 2019-10-15
    • 2019-11-24
    • 2015-12-10
    • 2018-04-23
    • 2021-10-25
    • 1970-01-01
    • 2013-10-14
    • 2021-03-13
    • 1970-01-01
    相关资源
    最近更新 更多