📜  绘制混淆矩阵 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:31.066000             🧑  作者: Mango

代码示例5
from sklearn.metrics import confusion_matrix
matrix_confusion = confusion_matrix(y_test, y_pred)
sns.heatmap(matrix_confusion, square=True, annot=True, cmap='Blues', fmt='d', cbar=False