MAP, NDCG, MRR — when do you use each in ranking?
hardAnswer
- MRR (Mean Reciprocal Rank): 1/rank of the first relevant item, averaged over queries.
- Ideal for 'find one right answer' tasks.
- MAP (Mean Average Precision): mean of per-query average precision — for tasks with multiple relevant items and only binary relevance.
- NDCG (Normalized Discounted Cumulative Gain): uses graded relevance and log-position discount — the standard for search / recommendation ranking with graded labels.
- Use MRR for factoid QA, MAP for binary relevance, NDCG for graded relevance.
Check yourself — multiple choice
- They all measure the same thing
- MRR: first relevant only. MAP: multiple binary. NDCG: graded relevance with position discount.
- MAP is a regression metric
- NDCG only works for accuracy
MRR = 1/rank of first relevant; MAP = binary multi-relevant; NDCG = graded + log discount.
#metrics#classification
Practise Supervised Learning
215 interview questions in this topic.
Related questions
- Precision vs recall — when do you optimize each?
- How do you read a confusion matrix and derive the key metrics?
- Why is accuracy a bad primary metric for many real-world problems?
- What is F-beta score and when is F1 not enough?
- Macro vs micro vs weighted averaging in multi-class metrics — how do you choose?
- What is Cohen's kappa and why is it useful?