class_docstr: Mixin class for all cluster estimators in scikit-learn.
class_docstr_tok: ["Mixin","class","for","all","cluster","estimators","in","scikit-learn","."]
docstr: Performs clustering on X and returns cluster labels.
  
  Parameters
  ----------
  X : ndarray, shape (n_samples, n_features)
      Input data.
  
  Returns
  -------
  y : ndarray, shape (n_samples,)
      cluster labels
docstr_tok: ["Performs","clustering","on","X","and","returns","cluster","labels",".","Parameters","--","--","--","--","--","X",":","ndarray",",","shape","(","n_samples",",","n_features",")","Input","data",".","Returns","--","--","--","-","y",":","ndarray",",","shape","(","n_samples",",",")","cluster","labels"]
code: def fit_predict(self, X, y=None):
      """Performs clustering on X and returns cluster labels.
  
      Parameters
      ----------
      X : ndarray, shape (n_samples, n_features)
          Input data.
  
      Returns
      -------
      y : ndarray, shape (n_samples,)
          cluster labels
      """
      # non-optimized default implementation; override when a better
      # method is possible for a given clustering algorithm
      self.fit(X)
      return self.labels_
  
imports: import copy
  import warnings
  import numpy
  from scipy import sparse
  from .externals import six
  from .utils.fixes import signature
  from .utils.deprecation import deprecated
  from .exceptions import ChangedBehaviorWarning
  from .None import __version__
label_desc: Use image node_id 1 for calling the ClusterMixin obj's underlying member method code with example usage: obj.fit_predict(X, y) and returns: self