sklearn.base.ClusterMixin

class sklearn.base.ClusterMixin

Mixin class for all cluster estimators in scikit-learn.

Methods

fit_predict(X[, y]) Performs clustering on X and returns cluster labels.
__init__($self, /, *args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

fit_predict(X, y=None)

Performs clustering on X and returns cluster labels.

Parameters:

X : ndarray, shape (n_samples, n_features)

Input data.

y : Ignored

not used, present for API consistency by convention.

Returns:

labels : ndarray, shape (n_samples,)

cluster labels