Retrieval Mean Reciprocal Rank (MRR)¶
Module Interface¶
- torchmetrics.RetrievalMRR[source]
alias of
_RetrievalMRR
Functional Interface¶
- torchmetrics.functional.retrieval_reciprocal_rank(preds, target)[source]
Wrapper for deprecated import.
>>> from torch import tensor >>> preds = tensor([0.2, 0.3, 0.5]) >>> target = tensor([False, True, False]) :rtype: :py:class:`~torch.Tensor`
>>> _retrieval_reciprocal_rank(preds, target) tensor(0.5000)