Auc¶
- class paddle.metric. Auc ¶
注解
目前只用 Python 实现 Auc,可能速度略慢。
该接口计算 Auc,在二分类(binary classification)中广泛使用。
该接口创建四个局部变量 true_positives,true_negatives,false_positives 和 false_negatives,用于计算 Auc。为了离散化 AUC 曲线,使用临界值的线性间隔来计算召回率和准确率的值。用 false positive 的召回值高度计算 ROC 曲线面积,用 recall 的准确值高度计算 PR 曲线面积。
参考链接:https://en.wikipedia.org/wiki/Receiver_operating_characteristic#Area_under_the_curve
参数¶
curve (str) - 将要计算的曲线名的模式,包括'ROC'(默认)或者'PR'(Precision-Recall-curve)。
num_thresholds (int) - 离散化 AUC 曲线的整数阈值数,默认是 4095。
name (str,可选) - metric 实例的名字,默认是'auc'。