'Fit the data from X, and returns the embedded coordinates
Parameters
X : array, shape (n_samples, n_features) or (n_samples, n_samples)
Input data. If ``dissimilarity==\'precomputed\'``, the input should
be the dissimilarity matrix.
init : ndarray, shape (n_samples,), optional, default: None
Starting configuration of the embedding to initialize the SMACOF
algorithm. By default, the algorithm is initialized with a randomly
chosen array.'

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

    X = check_array(X)
    if ((X.shape[0] == X.shape[1]) and (self.dissimilarity != 'precomputed')):
        warnings.warn("The    MDS    API    has    changed.    ``fit``    now    constructs    an    dissimilarity    matrix    from    data.    To    use    a    custom    dissimilarity    matrix,    set    ``dissimilarity='precomputed'``.")
    if (self.dissimilarity == 'precomputed'):
        self.dissimilarity_matrix_ = X
    elif (self.dissimilarity == 'euclidean'):
        self.dissimilarity_matrix_ = euclidean_distances(X)
    else:
        raise ValueError(("Proximity    must    be    'precomputed'    or    'euclidean'.    Got    %s    instead" % str(self.dissimilarity)))
    (self.embedding_, self.stress_, self.n_iter_) = smacof(self.dissimilarity_matrix_, metric=self.metric, n_components=self.n_components, init=init, n_init=self.n_init, n_jobs=self.n_jobs, max_iter=self.max_iter, verbose=self.verbose, eps=self.eps, random_state=self.random_state, return_n_iter=True)
    return self.embedding_
