NDCG (Normalized Discounted Cumulative Gain)#
DCG normalised by the ideal ordering, bounded between 0 and 1.
Important
✨ AI-generated content. This page was written with the assistance of an AI language model and is provided as a learning aid. Despite careful review, it may still contain mistakes, omissions, or out-of-date information. Whether you are new to the topic, a team lead, or a senior practitioner, treat it as a starting point rather than an authoritative reference: read it critically and independently verify anything you act on (code, commands, figures, and factual claims) against official documentation and primary sources before relying on it.
What it is#
Normalized Discounted Cumulative Gain measures ranking quality using both graded relevance and position. It sums each item’s relevance with a logarithmic discount for lower ranks (DCG), then divides by the ideal ordering’s score (IDCG):
A perfect ranking scores 1.
Why it’s powerful#
Unlike Hit Rate, NDCG rewards putting highly relevant items near the top and handles multi-level relevance (a 5-star match beats a 3-star one). Normalizing by IDCG makes it comparable across users with different numbers of relevant items — the reason it is the default offline ranking metric for recommenders and search.
In recsys#
Computed per user then averaged, NDCG@K captures the personalized-ordering quality that drives engagement. It is the recommender-system application of the same DCG used in information retrieval, so IR and recsys share this yardstick.
Theme: Ranking & Interleaving · All terminology
Hint
Mind map — connected ideas
DCG (Discounted Cumulative Gain) · Mean Average Precision (MAP) · Hit Rate (HR) · Average Precision (AP) · Relevance in Recommender Systems · Intra-List Diversity (ILD)
Hint
More in Ranking & Interleaving
Balanced Interleaving · DCG (Discounted Cumulative Gain) · Interleaving Tests · Mean Average Precision (MAP) · Probabilistic Interleaving · Ranking Algorithms · Team Draft Interleaving (TDI) · TREC (Text REtrieval Conference)
See also
Source article Adapted (context, re-expressed) in our own words from: NDCG (Normalized Discounted Cumulative Gain) (insightful-data-lab.com).