Retrieval Normalized DCG¶
Module Interface¶
- torchmetrics.RetrievalNormalizedDCG[source]
alias of
_RetrievalNormalizedDCG
Functional Interface¶
- torchmetrics.functional.retrieval_normalized_dcg(preds, target, top_k=None)[source]
Wrapper for deprecated import.
>>> from torch import tensor >>> preds = tensor([.1, .2, .3, 4, 70]) >>> target = tensor([10, 0, 0, 1, 5]) :rtype: :py:class:`~torch.Tensor`
>>> _retrieval_normalized_dcg(preds, target) tensor(0.6957)