Skip to content

[Feature]: Add NDCG (Normalized Discounted Cumulative Gain) metric to rec_sys #3581

@steaphenai

Description

@steaphenai

🚀 Feature

(Follow up to #3569 and #2631)

After adding HitRate@top_k and MRR@top_k metrics for recommendation systems, it makes sense to add NDCG@top_k as well.

NDCG complements MRR by considering all relevant items in the ranking, not just the first one. This makes it useful for:

  • Recommendation systems evaluation
  • RAG (Retrieval Augmented Generation) pipeline evaluation
  • Information retrieval benchmarking

Similar to MRR, the implementation would:

  • Follow the same structure as HitRate and MRR
  • Support multiple top_k values in a single call
  • Use ranx as reference implementation for tests

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions