TargetTags#

classsklearn.utils.TargetTags(required:bool,one_d_labels:bool=False,two_d_labels:bool=False,positive_only:bool=False,multi_output:bool=False,single_output:bool=True)[source]#

Tags for the target data.

Parameters:
requiredbool

Whether the estimator requires y to be passed tofit,fit_predict orfit_transform methods. The tag isTruefor estimators inheriting from~sklearn.base.RegressorMixinand~sklearn.base.ClassifierMixin.

one_d_labelsbool, default=False

Whether the input is a 1D labels (y).

two_d_labelsbool, default=False

Whether the input is a 2D labels (y).

positive_onlybool, default=False

Whether the estimator requires a positive y (only applicablefor regression).

multi_outputbool, default=False

Whether a regressor supports multi-target outputs or a classifier supportsmulti-class multi-output.

Seemulti-output in the glossary.

single_outputbool, default=True

Whether the target can be single-output. This can beFalse if theestimator supports only multi-output cases.

On this page

This Page