Notes

MAP (RecSys)

Precision@k tells you how many of the ten items you showed were relevant. It does not care whether they sat at position one or position ten. Mean average precision is the repair: a single number that rewards putting the good items early.

How it is computed
For one user, walk down the ranked list. Each time you hit a relevant item, record the precision of the list up to that position — a hit at rank 1 scores 1.0; a hit at rank 5 with two relevant items above it scores 0.6. Average those values over the user's relevant items to get average precision, then take the mean across users for MAP. Lists are truncated in practice, giving MAP@k, with the per-user average divided by the smaller of k and the number of relevant items, so a user with one relevant item is not scored against an impossible ceiling.

What it rewards, and what it ignores
MAP assumes binary relevance — an item either is or is not relevant — and within that assumption it is the most informative of the simple top-k measures:

  • It credits every relevant item the user had, unlike MRR, which stops at the first hit.
  • It is position-sensitive, unlike Precision@k and Recall@k, which judge a set.
  • It cannot express that one item is more relevant than another — graded relevance is NDCG's job.

Reading it honestly
Relevance comes from logged interactions, so MAP measures agreement with what the previous system chose to show. An item the user would have loved but never saw counts as a miss, which penalises genuinely novel recommendations. Scoring against a sample of negatives rather than the full catalogue — routine on MovieLens benchmarks — inflates the number, and not uniformly across models.

MAP averages, over users, the precision measured at each position where a relevant item appears in the ranked list. It assumes binary relevance and rewards placing relevant items early, so it separates two systems that return the same hits in a different order. Unlike MRR it credits every relevant item rather than only the first, which makes it the standard rank-aware metric when users have several valid targets.

Picture someone handing you a shortlist of ten films, three of which you would genuinely enjoy. Were those three right at the top, or buried at positions eight, nine and ten? Both lists contain the same three films, but one of them is clearly the better list.

MAP is a score that notices the difference. It checks how early each good suggestion appears, gives more credit the nearer the top it sits, and then averages that across everyone being recommended to. One number, bigger is better, and it answers the question people actually care about: not just whether the system found the right things, but whether it put them where you would look.