Skip to content

Add MRR (Mean Reciprocal Rank) metric to rec_sys#3573

Open
steaphenai wants to merge 13 commits intopytorch:masterfrom
steaphenai:feat/mrr-metric-steaphen
Open

Add MRR (Mean Reciprocal Rank) metric to rec_sys#3573
steaphenai wants to merge 13 commits intopytorch:masterfrom
steaphenai:feat/mrr-metric-steaphen

Conversation

@steaphenai
Copy link
Contributor

@steaphenai steaphenai commented Feb 22, 2026

closes #3569
Refs #3572

Description: Add MRR (Mean Reciprocal Rank) metric to ignite/metrics/rec_sys.

  • Supports multiple top_k values in a single call
  • Uses torch.argsort with stable=True for deterministic tie-breaking
  • Uses ranx as reference implementation for tests
  • Adds relevance_threshold to support graded relevance labels

Check list:

  • New tests are added (if a new feature is added)
  • New doc strings: description and/or example code are in RST format
  • Documentation is updated (if required)

@github-actions github-actions bot added the module: metrics Metrics module label Feb 22, 2026
@vfdev-5
Copy link
Collaborator

vfdev-5 commented Feb 22, 2026

@steaphenai please check also this discussion on top k stuff: #3568 (comment)

@steaphenai
Copy link
Contributor Author

@steaphenai please check also this discussion on top k stuff: #3568 (comment)

Thanks! I've read #3568. The current implementation keeps top_k specific to MRR following the same pattern as HitRate. I'll update if needed once the TopK wrapper approach is decided.

@github-actions github-actions bot added the docs label Mar 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Add Mean Reciprocal Rank (MRR) metric to rec_sys

2 participants