【问题标题】:How to change color of confusion matrix in pandas_ml如何更改 pandas_ml 中混淆矩阵的颜色
【发布时间】:2018-12-03 15:26:37
【问题描述】:

我正在使用 python 2.7 中的 pandas_ml 包绘制混淆矩阵 使用以下代码

cm = ConfusionMatrix(true, pred)
cm.plot( normalized=True)

如何指定配色方案?

【问题讨论】:

    标签: python pandas-ml


    【解决方案1】:

    只要后端不是 seaborn,你就可以这样做

    plt.set_cmap('Blues')
    

    【讨论】:

      猜你喜欢
      • 2018-11-27
      • 2019-11-24
      • 2022-01-02
      • 2017-03-07
      • 2021-09-29
      • 2015-07-07
      • 2019-03-23
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多