@@ -98,6 +98,8 @@ class TargetTags:
9898 Whether a regressor supports multi-target outputs or a classifier supports
9999 multi-class multi-output.
100100
101+ See :term:`multi-output` in the glossary.
102+
101103 single_output : bool, default=True
102104 Whether the target can be single-output. This can be ``False`` if the
103105 estimator supports only multi-output cases.
@@ -150,8 +152,13 @@ class ClassifierTags:
150152 classification. Therefore this flag indicates whether the
151153 classifier is a binary-classifier-only or not.
152154
155+ See :term:`multi-class` in the glossary.
156+
153157 multi_label : bool, default=False
154- Whether the classifier supports multi-label output.
158+ Whether the classifier supports multi-label output: a data point can
159+ be predicted to belong to a variable number of classes.
160+
161+ See :term:`multi-label` in the glossary.
155162 """
156163
157164 poor_score : bool = False
@@ -172,13 +179,9 @@ class RegressorTags:
172179 n_informative=1, bias=5.0, noise=20, random_state=42)``. The
173180 dataset and values are based on current estimators in scikit-learn
174181 and might be replaced by something more systematic.
175-
176- multi_label : bool, default=False
177- Whether the regressor supports multilabel output.
178182 """
179183
180184 poor_score : bool = False
181- multi_label : bool = False
182185
183186
184187@dataclass (** _dataclass_args ())
@@ -496,7 +499,6 @@ def _to_new_tags(old_tags, estimator=None):
496499 if estimator_type == "regressor" :
497500 regressor_tags = RegressorTags (
498501 poor_score = old_tags ["poor_score" ],
499- multi_label = old_tags ["multilabel" ],
500502 )
501503 else :
502504 regressor_tags = None
@@ -520,18 +522,16 @@ def _to_old_tags(new_tags):
520522 """Utility function convert old tags (dictionary) to new tags (dataclass)."""
521523 if new_tags .classifier_tags :
522524 binary_only = not new_tags .classifier_tags .multi_class
523- multilabel_clf = new_tags .classifier_tags .multi_label
525+ multilabel = new_tags .classifier_tags .multi_label
524526 poor_score_clf = new_tags .classifier_tags .poor_score
525527 else :
526528 binary_only = False
527- multilabel_clf = False
529+ multilabel = False
528530 poor_score_clf = False
529531
530532 if new_tags .regressor_tags :
531- multilabel_reg = new_tags .regressor_tags .multi_label
532533 poor_score_reg = new_tags .regressor_tags .poor_score
533534 else :
534- multilabel_reg = False
535535 poor_score_reg = False
536536
537537 if new_tags .transformer_tags :
@@ -543,7 +543,7 @@ def _to_old_tags(new_tags):
543543 "allow_nan" : new_tags .input_tags .allow_nan ,
544544 "array_api_support" : new_tags .array_api_support ,
545545 "binary_only" : binary_only ,
546- "multilabel" : multilabel_clf or multilabel_reg ,
546+ "multilabel" : multilabel ,
547547 "multioutput" : new_tags .target_tags .multi_output ,
548548 "multioutput_only" : (
549549 not new_tags .target_tags .single_output and new_tags .target_tags .multi_output
0 commit comments