VOCABULARY
Average Precision
Average Precision (AP) is a metric commonly used in the context of binary classification and information retrieval to summarize the Precision-Recall curve. It provides a single number that characterizes the quality of the ranked retrieval results for a given class or category, especially in tasks like object detection.
How Average Precision Works
1. Computing AP:
- Average Precision computes the weighted mean of precisions at each threshold:
- $$AP = \Sigma(Recall_{n}-Recall_{n-1})*Precision_{n}$$
- Where $n$ denotes a specific data point on the Precision-Recall curve.
2. Interpretation:
- AP values range between 0 and 1, where a value of 1 means the model's predictions are perfect (though this is rare in practice).
- AP considers both recall and precision in its computation, so it offers a balance between these two metrics.
![Lakera LLM Security Playbook](https://cdn.prod.website-files.com/65080baa3f9a607985451de3/65254b087d7b8af4624a0982_CTA%20Image.webp)
Learn how to protect against the most common LLM vulnerabilities
Download this guide to delve into the most common LLM security risks and ways to mitigate them.
Related terms
![](https://cdn.prod.website-files.com/65080baa3f9a607985451de3/650d8986cacb870bc87f91f2_Spacer%20Bottomr.webp)
Activate
untouchable mode.
untouchable mode.
Get started for free.
Lakera Guard protects your LLM applications from cybersecurity risks with a single line of code. Get started in minutes. Become stronger every day.
Join our Slack Community.
Several people are typing about AI/ML security. 
Come join us and 1000+ others in a chat that’s thoroughly SFW.