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

 

你可能感兴趣的:(python 预测测试集报告 precision 、recall 、f1-score 、support)