sklearn学习:roc_auc曲线和 metrics.roc_auc_score

1.概念

ROC(Receiver Operating Characteristic)曲线和AUC常被用来评价一个二值分类器(binary classifier)的优劣。

AUC(Area Under Curve)被定义为ROC曲线下的面积,显然这个面积的数值不会大于1。又由于ROC曲线一般都处于y=x这条直线的上方,所以AUC的取值范围在0.5和1之间。使用AUC值作为评价标准是因为很多时候ROC曲线并不能清晰的说明哪个分类器的效果更好,而作为一个数值,对应AUC更大的分类器效果更好。

2. metrics.roc_auc

sklearn.metrics.roc_curve(y_true, y_score, pos_label=None, sample_weight=None, drop_intermediate=True)

计算ROC值,仅用于二值分类器。

要注意到的参数
pos_label
Label considered as positive and others are considered negative.

此处官方文档,具体意思现在还不是很懂,先存下来
返回值
fpr
array, Increasing false positive rates

tpr
array, Increasing true positive rates

thresholds
array, Decreasing thresholds on the decision function used to compute fpr and tpr.

未完待续……


下面是摘抄和参考的链接们:

official website of roc_curve:
http://scikit-learn.org/stable/modules/generated/sklearn.metrics.roc_curve.html

csdn上一个很好的解释
https://blog.csdn.net/shenxiaoming77/article/details/72627882

另一个参考文章
http://alexkong.net/2013/06/introduction-to-auc-and-roc/

  • 2
    点赞
  • 19
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值