class_docstr: Compute label ranking average precision score for multilabel data [1].
  
  The score is the average over each ground truth label assigned to each sample of the ratio of true vs. total labels
  with lower score. Best score is 1.
  
  As input to ``forward`` and ``update`` the metric accepts the following input:
  
  - ``preds`` (:class:`~torch.Tensor`): A float tensor of shape ``(N, C, ...)``. Preds should be a tensor
    containing probabilities or logits for each observation. If preds has values outside [0,1] range we consider
    the input to be logits and will auto apply sigmoid per element.
  - ``target`` (:class:`~torch.Tensor`): An int tensor of shape ``(N, C, ...)``. Target should be a tensor
    containing ground truth labels, and therefore only contain {0,1} values (except if `ignore_index` is specified).
  
  .. note::
     Additional dimension ``...`` will be flattened into the batch dimension.
  
  As output to ``forward`` and ``compute`` the metric returns the following output:
  
  - ``mlrap`` (:class:`~torch.Tensor`): A tensor containing the multilabel ranking average precision.
  
  Args:
      num_labels: Integer specifying the number of labels
      ignore_index:
          Specifies a target value that is ignored and does not contribute to the metric calculation
      validate_args: bool indicating if input arguments and tensors should be validated for correctness.
          Set to ``False`` for faster computations.
  
  Example:
      >>> from torchmetrics.classification import MultilabelRankingAveragePrecision
      >>> _ = torch.manual_seed(42)
      >>> preds = torch.rand(10, 5)
      >>> target = torch.randint(2, (10, 5))
      >>> mlrap = MultilabelRankingAveragePrecision(num_labels=5)
      >>> mlrap(preds, target)
      tensor(0.7744)
docstr: Compute metric.
docstr_tok: ["Compute","metric","."]
code: def compute(self) -> Tensor:
      """Compute metric."""
      return _ranking_reduce(self.measure, self.total)
  
imports: from typing import Any, Optional, Sequence, Union
  import torch
  from torch import Tensor
  from torchmetrics.functional.classification.ranking import _multilabel_confusion_matrix_arg_validation, _multilabel_confusion_matrix_format, _multilabel_coverage_error_update, _multilabel_ranking_average_precision_update, _multilabel_ranking_loss_update, _multilabel_ranking_tensor_validation, _ranking_reduce
  from torchmetrics.metric import Metric
  from torchmetrics.utilities.imports import _MATPLOTLIB_AVAILABLE
  from torchmetrics.utilities.plot import _AX_TYPE, _PLOT_OUT_TYPE
label_desc: Use image node_id 3 for calling the MultilabelRankingAveragePrecision obj's underlying member method code with example usage: obj.compute() and returns: _ranking_reduce