混淆矩阵
混淆矩阵见:我的博客
准确率
import numpy as np
from sklearn.metrics import accuracy_score
y_pred = [0, 2, 1, 3]
y_true = [0, 1, 2, 3]
print(accuracy_score(y_true, y_pred))
print(accuracy_score(y_true, y_pred, normalize=False))
# 在具有二元标签指示符的多标签分类案例中
print(accuracy_score