'Transform X into subcluster centroids dimension.
Each dimension represents the distance from the sample point to each
cluster centroid.
Parameters
X : {array-like, sparse matrix}, shape (n_samples, n_features)
Input data.
Returns
X_trans : {array-like, sparse matrix}, shape (n_samples, n_clusters)
Transformed data.'

def transform(self, X):

    check_is_fitted(self, 'subcluster_centers_')
    return euclidean_distances(X, self.subcluster_centers_)
