当前位置:   article > 正文

如何使用python计算准确率、召回率_pytorch计算召回率

pytorch计算召回率
from sklearn.metrics import accuracy_score
from sklearn.metrics import precision_score, recall_score
from sklearn.metrics import f1_score
targets = test_df['label']
outputs = test_df['result']

precision = precision_score(targets, outputs)
recall =  recall_score(targets,outputs)
f1 = f1_score(targets,outputs)
print(precision)
print(recall)
print(f1)
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/你好赵伟/article/detail/142844
推荐阅读
相关标签
  

闽ICP备14008679号