'Performs clustering on X and returns cluster labels.
Parameters
X : array or sparse (CSR) matrix of shape (n_samples, n_features), or                 array of shape (n_samples, n_samples)
A feature array, or array of distances between samples if
``metric=\'precomputed\'``.
sample_weight : array, shape (n_samples,), optional
Weight of each sample, such that a sample with a weight of at least
``min_samples`` is by itself a core sample; a sample with negative
weight may inhibit its eps-neighbor from being core.
Note that weights are absolute, and default to 1.
Returns
y : ndarray, shape (n_samples,)
cluster labels'

def fit_predict(self, X, y=None, sample_weight=None):

    self.fit(X, sample_weight=sample_weight)
    return self.labels_
