Shortcuts

Retrieval Recall

Module Interface

torchmetrics.RetrievalRecall[source]

alias of _RetrievalRecall

Functional Interface

torchmetrics.functional.retrieval_recall(preds, target, top_k=None)[source]

Wrapper for deprecated import.

>>> from torch import tensor
>>> preds = tensor([0.2, 0.3, 0.5])
>>> target = tensor([True, False, True])
:rtype: :py:class:`~torch.Tensor`
>>> _retrieval_recall(preds, target, top_k=2)
tensor(0.5000)