• Docs >
  • Retrieval Mean Reciprocal Rank (MRR)
Shortcuts

Retrieval Mean Reciprocal Rank (MRR)

Module Interface

torchmetrics.RetrievalMRR[source]

alias of torchmetrics.retrieval._deprecated._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])
>>> _retrieval_reciprocal_rank(preds, target)
tensor(0.5000)
Return type

Tensor