classification_report

2020-03-02  本文已影响0人  番茄酱的汪

classification_report简介

参考文章:https://blog.csdn.net/akadiao/article/details/78788864

from sklearn.metrics import classification_report
y_true = [0, 1, 2, 2, 2]
y_pred = [0, 0, 2, 2, 1]
target_names = ['class 0', 'class 1', 'class 2']
print(classification_report(y_true, y_pred, target_names=target_names))

结果为


结果
上一篇下一篇

猜你喜欢

热点阅读