File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
Filter options
Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
Original file line number Diff line number Diff line change @@ -475,9 +475,16 @@ on a classifier, but not otherwise. Similarly, scorers for average precision
475
475
that take a continuous prediction need to call ``decision_function `` for classifiers,
476
476
but ``predict `` for regressors. This distinction between classifiers and regressors
477
477
is implemented using the ``_estimator_type `` attribute, which takes a string value.
478
- It should be ``"classifier" `` for classifiers and ``"regressor" `` for
479
- regressors and ``"clusterer" `` for clustering methods, to work as expected.
480
- Inheriting from ``ClassifierMixin ``, ``RegressorMixin `` or ``ClusterMixin ``
478
+ This attribute should have the following values to work as expected:
479
+
480
+ - ``"classifier" `` for classifiers
481
+ - ``"regressor" `` for regressors
482
+ - ``"clusterer" `` for clustering methods
483
+ - ``"outlier_detector" `` for outlier detectors
484
+ - ``"DensityEstimator" `` for density estimators
485
+
486
+ Inheriting from :class: `~base.ClassifierMixin `, :class: `~base.RegressorMixin `, :class: `~base.ClusterMixin `,
487
+ :class: `~base.OutlierMixin ` or :class: `~base.DensityMixin `,
481
488
will set the attribute automatically. When a meta-estimator needs to distinguish
482
489
among estimator types, instead of checking ``_estimator_type `` directly, helpers
483
490
like :func: `base.is_classifier ` should be used.
You can’t perform that action at this time.
0 commit comments