sklearn.metrics.precision_recall_curve & sklearn.metrics.average_precision_score计算方法

挣扎了好久终于明白了sklearn中PR曲线的计算方法, mark一下

1. klearn.metrics.precision_recall_curve计算

sklearn.metrics.precision_recall_curve & sklearn.metrics.average_precision_score计算方法_第1张图片

2. sklearn.metrics.average_precision_score计算

(0.5-0)*1+(0.5-0.5)*0.5+(1-0.5)*0.66...=0.83

 

参考链接:

https://www.cnblogs.com/zle1992/p/6825076.html

https://scikit-learn.org/stable/modules/generated/sklearn.metrics.precision_recall_curve.html

https://scikit-learn.org/stable/modules/generated/sklearn.metrics.average_precision_score.html

你可能感兴趣的:(sklearn.metrics.precision_recall_curve & sklearn.metrics.average_precision_score计算方法)