How does average precision reward early relevant hits?

Average precision weights precision at each threshold by the increase in recall.

average_precision_score in practice

With two relevant documents at ranks one and three and distinct scores, AP is (1 + 2/3)/2. Moving the third result lower hurts even if both are eventually retrieved.

中文

平均精度 AP 如何给检索结果打分?

AP 按每次召回率的增量加权对应的查准率,将不同阈值下的表现汇成一项分数。

average_precision_score 应用实例

两个相关文档排第 1 和第 3,且分数互异,AP 为 (1 + 2/3)/2。把第 3 名往后移会降分,即使最终都能找到。

References / 参考来源

Keep reading / 继续阅读