sklearn.metrics中几个AUC和ROC函数

sklearn.metrics.roc_auc_score(y_true,y_score)

y_true:真实标签的类别值;

y_scores:target scores,或者预测的正类标签的概率值;对于二进制y_true,y_score应该是类别中最大值的scores。

sklearn.metrics.roc_curve(y_true,y_score,pos_label)

y_true:真实标签的类别值;

y_scores:target scores,或者预测的正类标签的概率值;

pos_label:真实标签中正类标签的类别值,除该值外其余为负类标签。

返回值为TPR,FPR,threshold。

sklearn.metrics.auc(x, y)

一般结合metrics.roc_curve函数使用。

x:FPR值;

y:TPR值。

sklearn.metrics.roc_curve(y_true, y_score, pos_label)

y_true:真实标签的类别值;

y_scores:target scores,或者预测的正类标签的概率值;

pos_label:真实标签中正类标签的类别值,除该值外其余为负类标签。

发布了97 篇原创文章 · 获赞 40 · 访问量 16万+

猜你喜欢

转载自blog.csdn.net/NOT_GUY/article/details/88051849
今日推荐