Skip to content

Commit 15aa782

Browse files
authored
Docs: multilabel is also a string (#2996)
1 parent 34fca16 commit 15aa782

38 files changed

+42
-42
lines changed

src/torchmetrics/classification/accuracy.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ class Accuracy(_ClassificationTaskWrapper):
468468
Where :math:`y` is a tensor of target values, and :math:`\hat{y}` is a tensor of predictions.
469469
470470
This module is a simple wrapper to get the task specific versions of this metric, which is done by setting the
471-
``task`` argument to either ``'binary'``, ``'multiclass'`` or ``multilabel``. See the documentation of
471+
``task`` argument to either ``'binary'``, ``'multiclass'`` or ``'multilabel'``. See the documentation of
472472
:class:`~torchmetrics.classification.BinaryAccuracy`, :class:`~torchmetrics.classification.MulticlassAccuracy` and
473473
:class:`~torchmetrics.classification.MultilabelAccuracy` for the specific details of each argument influence and
474474
examples.

src/torchmetrics/classification/auroc.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ class AUROC(_ClassificationTaskWrapper):
482482
corresponds to random guessing.
483483
484484
This module is a simple wrapper to get the task specific versions of this metric, which is done by setting the
485-
``task`` argument to either ``'binary'``, ``'multiclass'`` or ``multilabel``. See the documentation of
485+
``task`` argument to either ``'binary'``, ``'multiclass'`` or ``'multilabel'``. See the documentation of
486486
:class:`~torchmetrics.classification.BinaryAUROC`, :class:`~torchmetrics.classification.MulticlassAUROC` and
487487
:class:`~torchmetrics.classification.MultilabelAUROC` for the specific details of each argument influence and
488488
examples.

src/torchmetrics/classification/average_precision.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ class AveragePrecision(_ClassificationTaskWrapper):
492492
equivalent to the area under the precision-recall curve (AUPRC).
493493
494494
This function is a simple wrapper to get the task specific versions of this metric, which is done by setting the
495-
``task`` argument to either ``'binary'``, ``'multiclass'`` or ``multilabel``. See the documentation of
495+
``task`` argument to either ``'binary'``, ``'multiclass'`` or ``'multilabel'``. See the documentation of
496496
:class:`~torchmetrics.classification.BinaryAveragePrecision`,
497497
:class:`~torchmetrics.classification.MulticlassAveragePrecision` and
498498
:class:`~torchmetrics.classification.MultilabelAveragePrecision` for the specific details of each argument

src/torchmetrics/classification/confusion_matrix.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ class ConfusionMatrix(_ClassificationTaskWrapper):
483483
r"""Compute the `confusion matrix`_.
484484
485485
This function is a simple wrapper to get the task specific versions of this metric, which is done by setting the
486-
``task`` argument to either ``'binary'``, ``'multiclass'`` or ``multilabel``. See the documentation of
486+
``task`` argument to either ``'binary'``, ``'multiclass'`` or ``'multilabel'``. See the documentation of
487487
:class:`~torchmetrics.classification.BinaryConfusionMatrix`,
488488
:class:`~torchmetrics.classification.MulticlassConfusionMatrix` and
489489
:class:`~torchmetrics.classification.MultilabelConfusionMatrix` for the specific details of each argument influence

src/torchmetrics/classification/exact_match.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ class ExactMatch(_ClassificationTaskWrapper):
405405
correctly classified.
406406
407407
This module is a simple wrapper to get the task specific versions of this metric, which is done by setting the
408-
``task`` argument to either ``'multiclass'`` or ``multilabel``. See the documentation of
408+
``task`` argument to either ``'multiclass'`` or ``'multilabel'``. See the documentation of
409409
:class:`~torchmetrics.classification.MulticlassExactMatch` and
410410
:class:`~torchmetrics.classification.MultilabelExactMatch` for the specific details of each argument influence and
411411
examples.

src/torchmetrics/classification/f_beta.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1100,7 +1100,7 @@ class FBetaScore(_ClassificationTaskWrapper):
11001100
affected in turn.
11011101
11021102
This function is a simple wrapper to get the task specific versions of this metric, which is done by setting the
1103-
``task`` argument to either ``'binary'``, ``'multiclass'`` or ``multilabel``. See the documentation of
1103+
``task`` argument to either ``'binary'``, ``'multiclass'`` or ``'multilabel'``. See the documentation of
11041104
:class:`~torchmetrics.classification.BinaryFBetaScore`,
11051105
:class:`~torchmetrics.classification.MulticlassFBetaScore` and
11061106
:class:`~torchmetrics.classification.MultilabelFBetaScore` for the specific details of each argument influence
@@ -1168,7 +1168,7 @@ class F1Score(_ClassificationTaskWrapper):
11681168
affected in turn.
11691169
11701170
This function is a simple wrapper to get the task specific versions of this metric, which is done by setting the
1171-
``task`` argument to either ``'binary'``, ``'multiclass'`` or ``multilabel``. See the documentation of
1171+
``task`` argument to either ``'binary'``, ``'multiclass'`` or ``'multilabel'``. See the documentation of
11721172
:class:`~torchmetrics.classification.BinaryF1Score`, :class:`~torchmetrics.classification.MulticlassF1Score` and
11731173
:class:`~torchmetrics.classification.MultilabelF1Score` for the specific details of each argument influence and
11741174
examples.

src/torchmetrics/classification/hamming.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ class HammingDistance(_ClassificationTaskWrapper):
477477
tensor.
478478
479479
This function is a simple wrapper to get the task specific versions of this metric, which is done by setting the
480-
``task`` argument to either ``'binary'``, ``'multiclass'`` or ``multilabel``. See the documentation of
480+
``task`` argument to either ``'binary'``, ``'multiclass'`` or ``'multilabel'``. See the documentation of
481481
:class:`~torchmetrics.classification.BinaryHammingDistance`,
482482
:class:`~torchmetrics.classification.MulticlassHammingDistance` and
483483
:class:`~torchmetrics.classification.MultilabelHammingDistance` for the specific details of each argument influence

src/torchmetrics/classification/jaccard.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ class JaccardIndex(_ClassificationTaskWrapper):
441441
.. math:: J(A,B) = \frac{|A\cap B|}{|A\cup B|}
442442
443443
This function is a simple wrapper to get the task specific versions of this metric, which is done by setting the
444-
``task`` argument to either ``'binary'``, ``'multiclass'`` or ``multilabel``. See the documentation of
444+
``task`` argument to either ``'binary'``, ``'multiclass'`` or ``'multilabel'``. See the documentation of
445445
:class:`~torchmetrics.classification.BinaryJaccardIndex`,
446446
:class:`~torchmetrics.classification.MulticlassJaccardIndex` and
447447
:class:`~torchmetrics.classification.MultilabelJaccardIndex` for the specific details of each argument influence

src/torchmetrics/classification/logauc.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ class LogAUC(_ClassificationTaskWrapper):
468468
is of high importance.
469469
470470
This module is a simple wrapper to get the task specific versions of this metric, which is done by setting the
471-
``task`` argument to either ``'binary'``, ``'multiclass'`` or ``multilabel``. See the documentation of
471+
``task`` argument to either ``'binary'``, ``'multiclass'`` or ``'multilabel'``. See the documentation of
472472
:class:`~torchmetrics.classification.BinaryLogAUC`, :class:`~torchmetrics.classification.MulticlassLogAUC` and
473473
:class:`~torchmetrics.classification.MultilabelLogAUC` for the specific details of each argument influence and
474474
examples.

src/torchmetrics/classification/matthews_corrcoef.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ class MatthewsCorrCoef(_ClassificationTaskWrapper):
374374
This metric measures the general correlation or quality of a classification.
375375
376376
This function is a simple wrapper to get the task specific versions of this metric, which is done by setting the
377-
``task`` argument to either ``'binary'``, ``'multiclass'`` or ``multilabel``. See the documentation of
377+
``task`` argument to either ``'binary'``, ``'multiclass'`` or ``'multilabel'``. See the documentation of
378378
:class:`~torchmetrics.classification.BinaryMatthewsCorrCoef`,
379379
:class:`~torchmetrics.classification.MulticlassMatthewsCorrCoef` and
380380
:class:`~torchmetrics.classification.MultilabelMatthewsCorrCoef` for the specific details of each argument influence

src/torchmetrics/classification/negative_predictive_value.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ class NegativePredictiveValue(_ClassificationTaskWrapper):
467467
therefore be affected in turn.
468468
469469
This function is a simple wrapper to get the task specific versions of this metric, which is done by setting the
470-
``task`` argument to either ``'binary'``, ``'multiclass'`` or ``multilabel``. See the documentation of
470+
``task`` argument to either ``'binary'``, ``'multiclass'`` or ``'multilabel'``. See the documentation of
471471
:class:`~torchmetrics.classification.BinaryNegativePredictiveValue`,
472472
:class:`~torchmetrics.classification.MulticlassNegativePredictiveValue`
473473
and :class:`~torchmetrics.classification.MultilabelNegativePredictiveValue` for the specific details of each

src/torchmetrics/classification/precision_fixed_recall.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ class PrecisionAtFixedRecall(_ClassificationTaskWrapper):
477477
a given precision level.
478478
479479
This function is a simple wrapper to get the task specific versions of this metric, which is done by setting the
480-
``task`` argument to either ``'binary'``, ``'multiclass'`` or ``multilabel``. See the documentation of
480+
``task`` argument to either ``'binary'``, ``'multiclass'`` or ``'multilabel'``. See the documentation of
481481
:class:`~torchmetrics.classification.BinaryPrecisionAtFixedRecall`,
482482
:class:`~torchmetrics.classification.MulticlassPrecisionAtFixedRecall` and
483483
:class:`~torchmetrics.classification.MultilabelPrecisionAtFixedRecall` for the specific details of each argument

src/torchmetrics/classification/precision_recall.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -967,7 +967,7 @@ class Precision(_ClassificationTaskWrapper):
967967
therefore be affected in turn.
968968
969969
This function is a simple wrapper to get the task specific versions of this metric, which is done by setting the
970-
``task`` argument to either ``'binary'``, ``'multiclass'`` or ``multilabel``. See the documentation of
970+
``task`` argument to either ``'binary'``, ``'multiclass'`` or ``'multilabel'``. See the documentation of
971971
:class:`~torchmetrics.classification.BinaryPrecision`, :class:`~torchmetrics.classification.MulticlassPrecision` and
972972
:class:`~torchmetrics.classification.MultilabelPrecision` for the specific details of each argument influence and
973973
examples.
@@ -1032,7 +1032,7 @@ class Recall(_ClassificationTaskWrapper):
10321032
therefore be affected in turn.
10331033
10341034
This function is a simple wrapper to get the task specific versions of this metric, which is done by setting the
1035-
``task`` argument to either ``'binary'``, ``'multiclass'`` or ``multilabel``. See the documentation of
1035+
``task`` argument to either ``'binary'``, ``'multiclass'`` or ``'multilabel'``. See the documentation of
10361036
:class:`~torchmetrics.classification.BinaryRecall`,
10371037
:class:`~torchmetrics.classification.MulticlassRecall` and :class:`~torchmetrics.classification.MultilabelRecall`
10381038
for the specific details of each argument influence and examples.

src/torchmetrics/classification/precision_recall_curve.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ class PrecisionRecallCurve(_ClassificationTaskWrapper):
630630
tradeoff between the two values can been seen.
631631
632632
This function is a simple wrapper to get the task specific versions of this metric, which is done by setting the
633-
``task`` argument to either ``'binary'``, ``'multiclass'`` or ``multilabel``. See the documentation of
633+
``task`` argument to either ``'binary'``, ``'multiclass'`` or ``'multilabel'``. See the documentation of
634634
:class:`~torchmetrics.classification.BinaryPrecisionRecallCurve`,
635635
:class:`~torchmetrics.classification.MulticlassPrecisionRecallCurve` and
636636
:class:`~torchmetrics.classification.MultilabelPrecisionRecallCurve` for the specific details of each argument

src/torchmetrics/classification/recall_fixed_precision.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ class RecallAtFixedPrecision(_ClassificationTaskWrapper):
476476
a given precision level.
477477
478478
This function is a simple wrapper to get the task specific versions of this metric, which is done by setting the
479-
``task`` argument to either ``'binary'``, ``'multiclass'`` or ``multilabel``. See the documentation of
479+
``task`` argument to either ``'binary'``, ``'multiclass'`` or ``'multilabel'``. See the documentation of
480480
:class:`~torchmetrics.classification.BinaryRecallAtFixedPrecision`,
481481
:class:`~torchmetrics.classification.MulticlassRecallAtFixedPrecision` and
482482
:class:`~torchmetrics.classification.MultilabelRecallAtFixedPrecision` for the specific details of each argument

src/torchmetrics/classification/roc.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ class ROC(_ClassificationTaskWrapper):
512512
different thresholds, such that the tradeoff between the two values can be seen.
513513
514514
This function is a simple wrapper to get the task specific versions of this metric, which is done by setting the
515-
``task`` argument to either ``'binary'``, ``'multiclass'`` or ``multilabel``. See the documentation of
515+
``task`` argument to either ``'binary'``, ``'multiclass'`` or ``'multilabel'``. See the documentation of
516516
:class:`~torchmetrics.classification.BinaryROC`,
517517
:class:`~torchmetrics.classification.MulticlassROC` and
518518
:class:`~torchmetrics.classification.MultilabelROC` for the specific details of each argument

src/torchmetrics/classification/sensitivity_specificity.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ class SensitivityAtSpecificity(_ClassificationTaskWrapper):
337337
find the sensitivity for a given specificity level.
338338
339339
This function is a simple wrapper to get the task specific versions of this metric, which is done by setting the
340-
``task`` argument to either ``'binary'``, ``'multiclass'`` or ``multilabel``. See the documentation of
340+
``task`` argument to either ``'binary'``, ``'multiclass'`` or ``'multilabel'``. See the documentation of
341341
:class:`~torchmetrics.classification.BinarySensitivityAtSpecificity`,
342342
:class:`~torchmetrics.classification.MulticlassSensitivityAtSpecificity` and
343343
:class:`~torchmetrics.classification.MultilabelSensitivityAtSpecificity` for the specific details of each argument

src/torchmetrics/classification/specificity.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ class Specificity(_ClassificationTaskWrapper):
459459
therefore be affected in turn.
460460
461461
This function is a simple wrapper to get the task specific versions of this metric, which is done by setting the
462-
``task`` argument to either ``'binary'``, ``'multiclass'`` or ``multilabel``. See the documentation of
462+
``task`` argument to either ``'binary'``, ``'multiclass'`` or ``'multilabel'``. See the documentation of
463463
:class:`~torchmetrics.classification.BinarySpecificity`, :class:`~torchmetrics.classification.MulticlassSpecificity`
464464
and :class:`~torchmetrics.classification.MultilabelSpecificity` for the specific details of each argument influence
465465
and examples.

src/torchmetrics/classification/specificity_sensitivity.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ class SpecificityAtSensitivity(_ClassificationTaskWrapper):
337337
find the specificity for a given sensitivity level.
338338
339339
This function is a simple wrapper to get the task specific versions of this metric, which is done by setting the
340-
``task`` argument to either ``'binary'``, ``'multiclass'`` or ``multilabel``. See the documentation of
340+
``task`` argument to either ``'binary'``, ``'multiclass'`` or ``'multilabel'``. See the documentation of
341341
:class:`~torchmetrics.classification.BinarySpecificityAtSensitivity`,
342342
:class:`~torchmetrics.classification.MulticlassSpecificityAtSensitivity` and
343343
:class:`~torchmetrics.classification.MultilabelSpecificityAtSensitivity` for the specific details of each argument

src/torchmetrics/classification/stat_scores.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ class StatScores(_ClassificationTaskWrapper):
506506
r"""Compute the number of true positives, false positives, true negatives, false negatives and the support.
507507
508508
This function is a simple wrapper to get the task specific versions of this metric, which is done by setting the
509-
``task`` argument to either ``'binary'``, ``'multiclass'`` or ``multilabel``. See the documentation of
509+
``task`` argument to either ``'binary'``, ``'multiclass'`` or ``'multilabel'``. See the documentation of
510510
:class:`~torchmetrics.classification.BinaryStatScores`, :class:`~torchmetrics.classification.MulticlassStatScores`
511511
and :class:`~torchmetrics.classification.MultilabelStatScores` for the specific details of each argument influence
512512
and examples.

src/torchmetrics/functional/classification/accuracy.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ def accuracy(
394394
Where :math:`y` is a tensor of target values, and :math:`\hat{y}` is a tensor of predictions.
395395
396396
This function is a simple wrapper to get the task specific versions of this metric, which is done by setting the
397-
``task`` argument to either ``'binary'``, ``'multiclass'`` or ``multilabel``. See the documentation of
397+
``task`` argument to either ``'binary'``, ``'multiclass'`` or ``'multilabel'``. See the documentation of
398398
:func:`~torchmetrics.functional.classification.binary_accuracy`,
399399
:func:`~torchmetrics.functional.classification.multiclass_accuracy` and
400400
:func:`~torchmetrics.functional.classification.multilabel_accuracy` for the specific details of

src/torchmetrics/functional/classification/auroc.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ def auroc(
444444
corresponds to random guessing.
445445
446446
This function is a simple wrapper to get the task specific versions of this metric, which is done by setting the
447-
``task`` argument to either ``'binary'``, ``'multiclass'`` or ``multilabel``. See the documentation of
447+
``task`` argument to either ``'binary'``, ``'multiclass'`` or ``'multilabel'``. See the documentation of
448448
:func:`~torchmetrics.functional.classification.binary_auroc`,
449449
:func:`~torchmetrics.functional.classification.multiclass_auroc` and
450450
:func:`~torchmetrics.functional.classification.multilabel_auroc` for the specific details of

src/torchmetrics/functional/classification/average_precision.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ def average_precision(
429429
equivalent to the area under the precision-recall curve (AUPRC).
430430
431431
This function is a simple wrapper to get the task specific versions of this metric, which is done by setting the
432-
``task`` argument to either ``'binary'``, ``'multiclass'`` or ``multilabel``. See the documentation of
432+
``task`` argument to either ``'binary'``, ``'multiclass'`` or ``'multilabel'``. See the documentation of
433433
:func:`~torchmetrics.functional.classification.binary_average_precision`,
434434
:func:`~torchmetrics.functional.classification.multiclass_average_precision` and
435435
:func:`~torchmetrics.functional.classification.multilabel_average_precision`

src/torchmetrics/functional/classification/confusion_matrix.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,7 @@ def confusion_matrix(
608608
r"""Compute the `confusion matrix`_.
609609
610610
This function is a simple wrapper to get the task specific versions of this metric, which is done by setting the
611-
``task`` argument to either ``'binary'``, ``'multiclass'`` or ``multilabel``. See the documentation of
611+
``task`` argument to either ``'binary'``, ``'multiclass'`` or ``'multilabel'``. See the documentation of
612612
:func:`~torchmetrics.functional.classification.binary_confusion_matrix`,
613613
:func:`~torchmetrics.functional.classification.multiclass_confusion_matrix` and
614614
:func:`~torchmetrics.functional.classification.multilabel_confusion_matrix` for

src/torchmetrics/functional/classification/f_beta.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -731,7 +731,7 @@ def fbeta_score(
731731
{(\beta^2 * \text{precision}) + \text{recall}}
732732
733733
This function is a simple wrapper to get the task specific versions of this metric, which is done by setting the
734-
``task`` argument to either ``'binary'``, ``'multiclass'`` or ``multilabel``. See the documentation of
734+
``task`` argument to either ``'binary'``, ``'multiclass'`` or ``'multilabel'``. See the documentation of
735735
:func:`~torchmetrics.functional.classification.binary_fbeta_score`,
736736
:func:`~torchmetrics.functional.classification.multiclass_fbeta_score` and
737737
:func:`~torchmetrics.functional.classification.multilabel_fbeta_score` for the specific
@@ -806,7 +806,7 @@ def f1_score(
806806
F_{1} = 2\frac{\text{precision} * \text{recall}}{(\text{precision}) + \text{recall}}
807807
808808
This function is a simple wrapper to get the task specific versions of this metric, which is done by setting the
809-
``task`` argument to either ``'binary'``, ``'multiclass'`` or ``multilabel``. See the documentation of
809+
``task`` argument to either ``'binary'``, ``'multiclass'`` or ``'multilabel'``. See the documentation of
810810
:func:`~torchmetrics.functional.classification.binary_f1_score`,
811811
:func:`~torchmetrics.functional.classification.multiclass_f1_score` and
812812
:func:`~torchmetrics.functional.classification.multilabel_f1_score` for the specific

src/torchmetrics/functional/classification/hamming.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ def hamming_distance(
394394
tensor.
395395
396396
This function is a simple wrapper to get the task specific versions of this metric, which is done by setting the
397-
``task`` argument to either ``'binary'``, ``'multiclass'`` or ``multilabel``. See the documentation of
397+
``task`` argument to either ``'binary'``, ``'multiclass'`` or ``'multilabel'``. See the documentation of
398398
:func:`~torchmetrics.functional.classification.binary_hamming_distance`,
399399
:func:`~torchmetrics.functional.classification.multiclass_hamming_distance` and
400400
:func:`~torchmetrics.functional.classification.multilabel_hamming_distance` for

0 commit comments

Comments
 (0)