Add MRR (Mean Reciprocal Rank) metric to rec_sys
closes #3569 Refs #3572
Description: Add MRR (Mean Reciprocal Rank) metric to ignite/metrics/rec_sys.
- Supports multiple
top_kvalues in a single call - Uses
torch.argsortwithstable=Truefor deterministic tie-breaking - Uses ranx as reference implementation for tests
- Adds
relevance_thresholdto support graded relevance labels
Check list:
- [x] New tests are added (if a new feature is added)
- [x] New doc strings: description and/or example code are in RST format
- [ ] Documentation is updated (if required)
@steaphenai please check also this discussion on top k stuff: https://github.com/pytorch/ignite/issues/3568#issuecomment-3939547890
@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.
@aaishwarymishra can you review this PR instead of others and make it up to a mergeable state? Thanks!
@vfdev-5 My bad, I missed that there already a pr open :)