is_clusterer
- sklearn.base.is_clusterer(estimator)
Return True if the given estimator is (probably) a clusterer.
- Parameters:
- estimator : estimator instance
Estimator object to test.
- Returns
Return True if the given estimator is (probably) a clusterer.
Estimator object to test.
True if estimator is a clusterer and False otherwise.
>>> from sklearn.base import is_clusterer
>>> from sklearn.cluster import KMeans
>>> from sklearn.svm import SVC, SVR
>>> classifier = SVC()
>>> regressor = SVR()
>>> kmeans = KMeans()
>>> is_clusterer(classifier)
False
>>> is_clusterer(regressor)
False
>>> is_clusterer(kmeans)
True