【发布时间】:2020-05-07 23:32:29
【问题描述】:
我有这样的代码:
plt.figure(figsize=(8,5))
confusion_matrix = pd.crosstab(y_test, predictions, rownames=["Observed"], colnames=["Anticipated"])
sns.heatmap(confusion_matrix, annot=True, fmt= "d")
plt.show()
【问题讨论】:
-
很遗憾,我无法复制您的问题。我在 Windows 10 Python 3.7 上获得了以您的代码为中心的数字。你能分享一下你正在使用的 python、pandas、matplotlib 和 seaborn 的版本吗?
-
我有 Python 3.8、Pandas 0.25.1、Mtplotlib 3.1.1 和 Seaborn 0.9.0