sklearn.base.ClusterMixin

class sklearn.base.ClusterMixin [source]

Mixin class for all cluster estimators in scikit-learn.

Methods

fit_predict(X[, y])

Perform clustering on X and returns cluster labels.

fit_predict(X, y=None) [source]

Perform clustering on X and returns cluster labels.

Parameters
Xarray-like of shape (n_samples, n_features)

Input data.

yIgnored

Not used, present for API consistency by convention.

Returns
labelsndarray of shape (n_samples,), dtype=np.int64

Cluster labels.

© 2007–2020 The scikit-learn developers
Licensed under the 3-clause BSD License.
https://scikit-learn.org/0.24/modules/generated/sklearn.base.ClusterMixin.html