模型图 - 混淆矩阵 - 精度图

model plots - confusion matrix - Accuracy plot

在我的代码中,我绘制了准确度曲线图和混淆矩阵热图。然而: 1-我将两个地块合二为一(下图) 2- 为什么数字会这样变小?在我的热图中,我需要数字和百分比。

代码

display = confusion_matrix(y_test, y_pred)
print(display)
sns.heatmap(display, annot=True,cbar_kws={'format':PercentFormatter()}, cmap='Blues')

"""
Plot of Model Accuracy on Train and Validation Datasets
"""
plt.plot(history.history['accuracy'])
plt.plot(history.history['val_accuracy'])
plt.title('model accuracy')
plt.ylabel('accuracy')
plt.xlabel('epoch')
plt.legend(['train', 'val'], loc='upper left')
plt.show()

这一行之后:

sns.heatmap(display, annot=True,cbar_kws={'format':PercentFormatter()}, cmap='Blues')

添加新行:

plt.show()