@@ -98,6 +98,8 @@ class TargetTags:
98
98
Whether a regressor supports multi-target outputs or a classifier supports
99
99
multi-class multi-output.
100
100
101
+ See :term:`multi-output` in the glossary.
102
+
101
103
single_output : bool, default=True
102
104
Whether the target can be single-output. This can be ``False`` if the
103
105
estimator supports only multi-output cases.
@@ -150,8 +152,13 @@ class ClassifierTags:
150
152
classification. Therefore this flag indicates whether the
151
153
classifier is a binary-classifier-only or not.
152
154
155
+ See :term:`multi-class` in the glossary.
156
+
153
157
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.
155
162
"""
156
163
157
164
poor_score : bool = False
@@ -172,13 +179,9 @@ class RegressorTags:
172
179
n_informative=1, bias=5.0, noise=20, random_state=42)``. The
173
180
dataset and values are based on current estimators in scikit-learn
174
181
and might be replaced by something more systematic.
175
-
176
- multi_label : bool, default=False
177
- Whether the regressor supports multilabel output.
178
182
"""
179
183
180
184
poor_score : bool = False
181
- multi_label : bool = False
182
185
183
186
184
187
@dataclass (** _dataclass_args ())
@@ -496,7 +499,6 @@ def _to_new_tags(old_tags, estimator=None):
496
499
if estimator_type == "regressor" :
497
500
regressor_tags = RegressorTags (
498
501
poor_score = old_tags ["poor_score" ],
499
- multi_label = old_tags ["multilabel" ],
500
502
)
501
503
else :
502
504
regressor_tags = None
@@ -520,18 +522,16 @@ def _to_old_tags(new_tags):
520
522
"""Utility function convert old tags (dictionary) to new tags (dataclass)."""
521
523
if new_tags .classifier_tags :
522
524
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
524
526
poor_score_clf = new_tags .classifier_tags .poor_score
525
527
else :
526
528
binary_only = False
527
- multilabel_clf = False
529
+ multilabel = False
528
530
poor_score_clf = False
529
531
530
532
if new_tags .regressor_tags :
531
- multilabel_reg = new_tags .regressor_tags .multi_label
532
533
poor_score_reg = new_tags .regressor_tags .poor_score
533
534
else :
534
- multilabel_reg = False
535
535
poor_score_reg = False
536
536
537
537
if new_tags .transformer_tags :
@@ -543,7 +543,7 @@ def _to_old_tags(new_tags):
543
543
"allow_nan" : new_tags .input_tags .allow_nan ,
544
544
"array_api_support" : new_tags .array_api_support ,
545
545
"binary_only" : binary_only ,
546
- "multilabel" : multilabel_clf or multilabel_reg ,
546
+ "multilabel" : multilabel ,
547
547
"multioutput" : new_tags .target_tags .multi_output ,
548
548
"multioutput_only" : (
549
549
not new_tags .target_tags .single_output and new_tags .target_tags .multi_output
0 commit comments