为什么我的confusion_matrix无法正确显示?

时间:2020-01-06 10:00:58

标签: scikit-learn confusion-matrix

我一直在尝试虹膜数据集,并希望创建一个混淆矩阵。我创建混淆矩阵的代码是:

from sklearn.metrics import confusion_matrix

mat = confusion_matrix(ytest, y_model)

sns.heatmap(mat, square=True, annot=True, cbar=False)
plt.xlabel('predicted value')
plt.ylabel('true value');

结果以某种方式在顶部和底部截断。我需要帮助以找出原因...您可以帮忙吗? 谢谢!

enter image description here

0 个答案:

没有答案