赞
踩
p, r, f1, _ = precision_recall_fscore_support(self.y_true, self.y_pred, labels=[1, 2, 3, 4, 5, 6, 7, 8, 9], average=None,
warn_for=tuple())
print(f1)
p, r, f1, _ = precision_recall_fscore_support(self.y_true, self.y_pred, average='macro',
warn_for=tuple())
_, _, acc, _ = precision_recall_fscore_support(self.y_true, self.y_pred, average='micro', warn_for=tuple())
第一个可以统计各个F1值,第二个算的是F1平均值
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。