179 questions
No questions match those filters.
← All questions
EvaluationEasy· Ranking Metrics· nDCG
Write the formula for nDCG@k from memory.
This is one of the questions in the full AI/ML interview bank. Pro unlocks all 1789 questions; Premium includes the same bank plus the highest daily Practice limit.
See plansThe formula for nDCG@k involves calculating the Discounted Cumulative Gain (DCG) and normalizing it by the Ideal Discounted Cumulative Gain (IDCG). The logarithmic discount is used because it provides a principled way to reduce the weight of documents as their rank increases, ensuring that highly relevant items at the top of the list contribute more to the score than those at the bottom. Normalization is necessary to allow for fair comparisons across queries with varying numbers of relevant documents.