• Docs >
  • Retrieval Normalized DCG
Shortcuts

Retrieval Normalized DCG

Module Interface

torchmetrics.RetrievalNormalizedDCG[source]

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

Tensor