'Compute clustering and transform X to cluster-distance space.
Equivalent to fit(X).transform(X), but more efficiently implemented.
Parameters
X : {array-like, sparse matrix}, shape = [n_samples, n_features]
New data to transform.
Returns
X_new : array, shape [n_samples, k]
X transformed in the new space.'

def fit_transform(self, X, y=None):

    X = self._check_fit_data(X)
    return self.fit(X)._transform(X)
