NEW
Also known as: AP
The area under the precision–recall curve, summarizing ranking or detection performance across recall thresholds.
DESCRIPTION
Average Precision (AP) aggregates precision at varying recall levels to summarize ranking or detection quality. In information retrieval, AP averages precision at each relevant item position. In object detection benchmarks like COCO, AP is averaged over multiple IoU thresholds and categories. AP is robust under class imbalance compared to ROC AUC. It guides model selection, hyperparameter tuning, and threshold setting.
ALTERNATIVE DEFINITIONS
scikit-learn
Average precision summarizes a precision-recall curve as the weighted mean of precisions achieved at each threshold, with the increase in recall from the previous threshold used as the weight.
Formalizes AP as a weighted mean over thresholds in PR space.
COCO
Average Precision (AP) is averaged over IoU thresholds ranging from 0.50 to 0.95 with step size 0.05, averaged over all categories and 10 IoU thresholds.
Defines the widely used COCO AP protocol with multiple IoUs.
Wikipedia
Average precision (AP) is the average of the precision values obtained for the set of top k documents existing after each relevant document is retrieved.
Gives a retrieval-focused definition based on ranked lists.
RELATED TERMS
Precision Recall Precision-Recall Curve F1 Score mAP Confusion Matrix Ranking Metrics Information Retrieval Object Detection
COMPETING TERMS
RELATIONS
- Broader: Precision
KNOWLEDGE AREAS
AI Data Science Testing & Validation
TARGET AUDIENCE
Data Scientist AI Engineer MLOps Engineer
EXTERNAL SOURCES
- Wikipedia - Evaluation measures (information retrieval)#Average precision
- scikit-learn - Metrics guide including AP and PR
- COCO - COCO AP metric definition
- Papers With Code - AP overview and references
TOP QUESTIONS
Why use Average Precision instead of ROC AUC for imbalanced tasks?
AP focuses on precision at different recall levels, better reflecting performance on rare positives than ROC AUC.
Category: Relevancy
How is Average Precision computed in information retrieval?
It averages precision at each rank where a relevant item appears in the ordered results.
Category: Concept
How is AP defined in COCO object detection?
AP is averaged over IoU thresholds from 0.50 to 0.95 and across categories.
Category: Standards
What is the relation between AP and mean Average Precision (mAP)?
mAP is the mean of AP values across classes or queries.
Category: Misunderstanding
How can AP be improved?
Enhance ranking of true positives via better calibration, thresholding, and model architectures that reduce false positives.
Category: HowTo
What are pitfalls when reporting AP?
Not specifying the evaluation protocol, IoU thresholds, or averaging strategy misleads comparisons.
Category: Mistakes
How sensitive is AP to score calibration?
AP depends on the ordering induced by scores; poor calibration can harm the ranking and AP.
Category: Insight
Can AP be micro- or macro-averaged?
Yes. Macro averages per class evenly; micro aggregates contributions across classes before computing AP.
Category: Concept
What tools compute AP reliably?
scikit-learn, COCO API, and torchmetrics provide tested implementations.
Category: Tools