the metric calculation validate_args: bool indicating if input arguments and tensors should be validated for correctness. Set to ``False`` for faster computations. Returns: (tuple): a tuple of either 2 tensors or 2 lists containing - precision: an 1d tensor of size (n_classes, ) with the maximum precision for the given recall level per class - thresholds: an 1d tensor of size (n_classes, ) with the corresponding threshold level per class Example: >>> from torchmetrics.functional.classification import multiclass_precision_at_fixed_recall >>> preds = torch.tensor([[0.75, 0.05, 0.05, 0.05, 0.05], ... [0.05, 0.75, 0.05, 0.05, 0.05], ... [0.05, 0.05, 0.75, 0.05, 0.05], ... [0.05, 0.05, 0.05, 0.75, 0.05]]) >>> target = torch.tensor([0, 1, 3, 2]) >>> multiclass_precision_at_fixed_recall( # doctest: +NORMALIZE_WHITESPACE ... preds, target, num_classes=5, min_recall=0.5, thresholds=None) (tensor([1.0000, 1.0000, 0.2500, 0.2500, 0.0000]), tensor([7.5000e-01, 7.5000e-01, 5.0000e-02, 5.0000e-02, 1.0000e+06])) >>> multiclass_precision_at_fixed_recall( # doctest: +NORMALIZE_WHITESPACE ... preds, target, num_classes=5, min_recall=0.5, thresholds=5) (tensor([1.0000, 1.0000, 0.2500, 0.2500, 0.0000]), tensor([7.5000e-01, 7.5000e-01, 0.0000e+00, 0.0000e+00, 1.0000e+06])) r1