Add MRR (Mean Reciprocal Rank) metric to rec_sys#3572
Closed
suportly wants to merge 1 commit intopytorch:masterfrom
Closed
Add MRR (Mean Reciprocal Rank) metric to rec_sys#3572suportly wants to merge 1 commit intopytorch:masterfrom
suportly wants to merge 1 commit intopytorch:masterfrom
Conversation
Add Mean Reciprocal Rank metric for evaluating retrieval and recommendation systems. MRR measures the average of 1/rank of the first relevant item, supporting multiple top-k values and distributed computation, following the same pattern as HitRate. Refs pytorch#3569 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
3 tasks
Collaborator
|
Duplicate of #3573 |
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
MRR(Mean Reciprocal Rank) metric toignite/metrics/rec_sys/1/rankof the first relevant item across all queriesHitRate— supports multipletop_kvalues,ignore_zero_hits, distributed computation via@sync_all_reduceRefs #3569
New Files
ignite/metrics/rec_sys/mrr.py— MRR metric classtests/ignite/metrics/rec_sys/test_mrr_metric.py— 23 tests (all passing)Modified Files
ignite/metrics/rec_sys/__init__.py— export MRRignite/metrics/__init__.py— export MRR at top levelTest plan
from ignite.metrics import MRRworks correctly🤖 Generated with Claude Code