Home Knowledge Base NDCG (Normalized Discounted Cumulative Gain)

NDCG (Normalized Discounted Cumulative Gain) measures ranking quality — evaluating how well a ranked list places relevant items at the top, with higher-ranked relevant items contributing more to the score, the most widely used ranking metric.

What Is NDCG?

How NDCG Works

1. DCG (Discounted Cumulative Gain):

2. IDCG (Ideal DCG):

3. NDCG:

Why NDCG?

NDCG@K: Evaluate only top K results (e.g., NDCG@10 for top 10).

Advantages: Position-aware, handles graded relevance, normalized, widely adopted.

Disadvantages: Requires relevance labels, assumes logarithmic position discount, not intuitive to non-experts.

Applications: Search engine evaluation, recommender system evaluation, learning to rank optimization.

Tools: scikit-learn, TensorFlow Ranking, custom implementations.

NDCG is the gold standard for ranking evaluation — by considering both relevance and position, NDCG accurately measures ranking quality in search, recommendations, and any ranked list application.

ndcg (normalized discounted cumulative gain)ndcgnormalized discounted cumulative gainevaluation

Explore 500+ Semiconductor & AI Topics

From EUV lithography to CUDA optimization — search the full knowledge base or chat with our AI assistant.