sklearn--召回率-精确率-auc
作者:互联网
# -*- coding:utf-8 -*- from sklearn import metrics def recall_precision(true_y, pred_y): recall = metrics.recall_score(true_y, pred_y) precision = metrics.precision_score(true_y, pred_y) return recall, precision def auc_score(true_y, pred_score, label_value=1): f, t, _ = metrics.roc_curve(true_y, pred_score, pos_label=label_value) return metrics.auc(f, t)
标签:auc,--,pred,precision,metrics,score,recall,true,sklearn 来源: https://www.cnblogs.com/ai-tech/p/15121932.html