Métrica de Ganho Cumulativo Descontado Normalizado (NDCG)
O Ganho Cumulativo Descontado Normalizado (NDCG) metric is widely used in recuperação de informações and sistemas de recomendação to evaluate the effectiveness of algorithms in ranking items according to their relevance to a user’s query. NDCG takes into account both the position of an item in the ranked list and the relevance of that item, making it particularly useful when the items have varying levels of importance.
NDCG is calculated in two main steps: first, the Discounted Cumulative Gain (DCG) is computed, which sums the relevance scores of the retrieved items, discounted by their rank position. The formula for DCG at rank p is given by:
DCG_p = rel_1 + Σ (rel_i / log2(i + 1)), for i = 2 to p
where rel_i is the score de relevância of the item at rank i.
Em seguida, o NDCG normaliza o score do DCG dividindo-o pelo DCG Ideal (IDCG), que é o DCG da lista ideal classificada (a melhor classificação possível de itens com base na relevância). Essa normalização permite que o NDCG seja expresso em uma escala de 0 a 1, onde uma pontuação de 1 indica a classificação perfeita dos itens.
NDCG is particularly valuable in scenarios where the relevance of results is not binary (relevant or not) but graded, such as in motores de busca or recommendation systems. By utilizing NDCG, developers can gain insights into how well their algorithms perform in providing relevant results to users, thereby improving user satisfaction and experience.