What is NDCG?
NDCG evaluates how well a ranked list orders items by relevance grades (e.g., 0–3), discounting gains by rank so higher spots matter more, then normalizing by the ideal ordering.
How It Works (quick)
- DCG: Sum of graded relevance discounted by log position.
- IDCG: DCG of the ideal (perfect) order.
- NDCG = DCG/IDCG: Typically reported at @k (e.g., NDCG@10).
- Labels: From judgments, clicks (debiased), or purchases.
Why It Matters in E-commerce
- Correlates with CTR/conversion better than raw precision.
- Lets teams compare rankers across categories/locales.
Best Practices
- Use graded labels (click, add-to-cart, purchase).
- Report per category/locale and aggregate with weights.
- Track confidence intervals and drift over time.
Summary
NDCG is the go-to relevance metric: grade items, discount by rank, normalize, and compare.