Tags#

class sklearn.utils.Tags(target_tags: TargetTags, transformer_tags: TransformerTags | None, classifier_tags: ClassifierTags | None, regressor_tags: RegressorTags | None, array_api_support: bool = False, no_validation: bool = False, non_deterministic: bool = False, requires_fit: bool = True, _skip_test: bool = False, _xfail_checks: dict[str, str] = <factory>, input_tags: InputTags = <factory>)[source]#

Tags for the estimator.

See Estimator Tags for more information.

Parameters:
target_tagsTargetTags

The target(y) tags.

transformer_tagsTransformerTags or None

The transformer tags.

classifier_tagsClassifierTags or None

The classifier tags.

regressor_tagsRegressorTags or None

The regressor tags.

array_api_supportbool, default=False

Whether the estimator supports Array API compatible inputs.

no_validationbool, default=False

Whether the estimator skips input-validation. This is only meant for stateless and dummy transformers!

non_deterministicbool, default=False

Whether the estimator is not deterministic given a fixed random_state.

requires_fitbool, default=True

Whether the estimator requires to be fitted before calling one of transform, predict, predict_proba, or decision_function.

_skip_testbool, default=False

Whether to skip common tests entirely. Don’t use this unless you have a very good reason.

_xfail_checksdict[str, str], default={}

Dictionary {check_name: reason} of common checks that will be marked as XFAIL for pytest, when using parametrize_with_checks. These checks will be simply ignored and not run by check_estimator, but a SkipTestWarning will be raised. Don’t use this unless there is a very good reason for your estimator not to pass the check. Also note that the usage of this tag is highly subject to change because we are trying to make it more flexible: be prepared for breaking changes in the future.

input_tagsInputTags

The input data(X) tags.