AI engineering glossary · Evaluation metrics

What is DCG (discounted cumulative gain)?

Discounted cumulative gain (also called DCG): A ranking score that sums the relevance grade of each result divided by the log of its position: DCG = sum of rel_i / log2(i + 1). Highly relevant items near the top add the most, and gains shrink further down the list. It handles graded, not just yes-or-no, relevance.

Level: advancedTopic: Evaluation metrics

Discounted cumulative gain: an example

Relevance grades 3, 2, 0 at ranks 1, 2, 3 give DCG = 3/1 + 2/1.585 + 0 = about 4.26.

Related terms

More Evaluation metrics terms

Where you learn it

Discounted cumulative gain is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.