from sklearn.metrics import precision_score,recall_score print (precision_score(y_true, y_scores,average='micro')) average:string,[None,'binary'(默认),'micro','macro','samples','weighted'] 该参数对于多类/多标签目标是必需的.如果None,返回每个班级的分数.否则,这将确定对数据执行的平均类型: 'binary':