scikit-plot 缩放比例错误

scikit-plot scaling is wrong

我正在尝试在 jupyter notebook 中绘制混淆矩阵,但该图显示不正确。

我的代码是:

import scikitplot
plt.close()

scikitplot.metrics.plot_confusion_matrix(y_test, y_predicted_test)

并且此代码生成情节:

任何有关如何使绘图正确显示的建议将不胜感激。

查尔斯

尝试:

import scikitplot


scikitplot.metrics.plot_confusion_matrix(y_test, y_predicted_test)
plt.show()

如果你安装了matplotlib==3.1.1版本,降级即可。 我遇到了同样的问题,版本 == "3.0.3" 工作正常。

问题出在 "imshow" 函数上,因为从 seaborn 包绘制热图时会出现同样的问题。