python 预测测试集报告 precision 、recall 、f1-score 、support

from sklearn.metrics import confusion_matrix
from sklearn.metrics import classification_report

confusion_matrix(y_test, y_predict)

print(classification_report(y_test, y_predict))


           precision	recall	  f1-score	support
   A         0.9	  0.9	     0.9           23 
   B         0.84	  0.77       0.81	   51

microavg    xx	          xx	      xx	   74
macroavg    xx	          xx	      xx	   74
weightedavg xx	          xx	      xx	   74
发布了35 篇原创文章 · 获赞 26 · 访问量 8万+

猜你喜欢

转载自blog.csdn.net/weixin_42342968/article/details/83617607