is_label_ranker#

sklr.base.is_label_ranker(estimator: object) → bool#

Return True if the given estimator is (probably) a label ranker.

The estimator is taken for a label ranker if its estimator_type tag is "label_ranker", which LabelRankerMixin sets.

Parameters:
estimatorestimator instance

Estimator object to test.

Returns:
outbool

True if estimator is a label ranker and False otherwise.

See also

is_partial_label_ranker

Return whether an estimator is a partial label ranker.

Examples

>>> from sklearn.tree import DecisionTreeClassifier
>>> from sklr.base import is_label_ranker
>>> is_label_ranker(DecisionTreeClassifier())
False