Course contentsShow
← Machine Learning and Deep Learning
Lesson 2376 of 3,53851. Recommender SystemsFree lesson

Mean Average Precision (MAP)

Understand how MAP aggregates precision across different ranking positions for multiple queries.

Mean Average Precision (MAP)

What you'll learn: How MAP provides a single, comprehensive score that measures recommendation quality across multiple users and ranking positions.

The Core Idea

Imagine you're evaluating a recommender system for 100 different users. For each user, you calculated Precision@K at various cutoff points (like P@1, P@2, P@3, etc.). But how do you summarize all these numbers into one meaningful score?

Mean Average Precision (MAP) solves this by:

  1. Computing Average Precision (AP) for each user/query
  2. Averaging those AP scores across all users

Understanding Average Precision

For a single user's recommendation list, Average Precision is the mean of precision values calculated at each position where a relevant item appears.

If a user has 5 relevant items and your system recommends 10 items:

  • Calculate Precision@K only at positions where you correctly recommended a relevant item
  • Average those precision values
  • This rewards systems that rank relevant items higher

Why MAP Matters

MAP aggregates performance across:

  • Multiple ranking positions (early positions count more because you only compute precision when hitting relevant items)
  • Multiple queries/users (the final "mean" averages AP across everyone)

Unlike simple Precision@K which only looks at one cutoff, MAP considers the order of relevant items throughout the entire ranked list. A system that puts all relevant items at the top gets a higher MAP than one that scatters them throughout.

Key Takeaway: MAP is a single metric that rewards recommender systems for ranking relevant items highly and consistently across all users, making it ideal for comparing overall system performance.