class_docstr: Multidimensional scaling
  
  Read more in the :ref:`User Guide <multidimensional_scaling>`.
  
  Parameters
  ----------
  metric : boolean, optional, default: True
      compute metric or nonmetric SMACOF (Scaling by Majorizing a
      Complicated Function) algorithm
  
  n_components : int, optional, default: 2
      number of dimension in which to immerse the similarities
      overridden if initial array is provided.
  
  n_init : int, optional, default: 4
      Number of time the smacof algorithm will be run with different
      initialisation. The final results will be the best output of the
      n_init consecutive runs in terms of stress.
  
  max_iter : int, optional, default: 300
      Maximum number of iterations of the SMACOF algorithm for a single run
  
  verbose : int, optional, default: 0
      level of verbosity
  
  eps : float, optional, default: 1e-6
      relative tolerance w.r.t stress to declare converge
  
  n_jobs : int, optional, default: 1
      The number of jobs to use for the computation. This works by breaking
      down the pairwise matrix into n_jobs even slices and computing them in
      parallel.
  
      If -1 all CPUs are used. If 1 is given, no parallel computing code is
      used at all, which is useful for debugging. For n_jobs below -1,
      (n_cpus + 1 + n_jobs) are used. Thus for n_jobs = -2, all CPUs but one
      are used.
  
  random_state : integer or numpy.RandomState, optional
      The generator used to initialize the centers. If an integer is
      given, it fixes the seed. Defaults to the global numpy random
      number generator.
  
  dissimilarity : string
      Which dissimilarity measure to use.
      Supported are 'euclidean' and 'precomputed'.
  
  
  Attributes
  ----------
  embedding_ : array-like, shape [n_components, n_samples]
      Stores the position of the dataset in the embedding space
  
  stress_ : float
      The final value of the stress (sum of squared distance of the
      disparities and the distances for all constrained points)
  
  
  References
  ----------
  "Modern Multidimensional Scaling - Theory and Applications" Borg, I.;
  Groenen P. Springer Series in Statistics (1997)
  
  "Nonmetric multidimensional scaling: a numerical method" Kruskal, J.
  Psychometrika, 29 (1964)
  
  "Multidimensional scaling by optimizing goodness of fit to a nonmetric
  hypothesis" Kruskal, J. Psychometrika, 29, (1964)
docstr: Fit the data from X, and returns the embedded coordinates
  
  Parameters
  ----------
  X : array, shape=[n_samples, n_features], or [n_samples, n_samples]                 if dissimilarity='precomputed'
      Input data.
  
  init : {None or ndarray, shape (n_samples,)}, optional
      If None, randomly chooses the initial configuration
      if ndarray, initialize the SMACOF algorithm with this array.
docstr_tok: ["Fit","the","data","from","X",",","and","returns","the","embedded","coordinates","Parameters","--","--","--","--","--","X",":","array",",","shape=","[","n_samples",",","n_features","]",",","or","[","n_samples",",","n_samples","]","if","dissimilarity='precomputed'","Input","data",".","init",":","{","None","or","ndarray",",","shape","(","n_samples",",",")","}",",","optional","If","None",",","randomly","chooses","the","initial","configuration","if","ndarray",",","initialize","the","SMACOF","algorithm","with","this","array","."]
code: def fit_transform(self, X, y=None, init=None):
      """
          Fit the data from X, and returns the embedded coordinates
  
          Parameters
          ----------
          X : array, shape=[n_samples, n_features], or [n_samples, n_samples] \
                  if dissimilarity='precomputed'
              Input data.
  
          init : {None or ndarray, shape (n_samples,)}, optional
              If None, randomly chooses the initial configuration
              if ndarray, initialize the SMACOF algorithm with this array.
  
          """
      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_
  
file_path: catboost/contrib/python/scikit-learn/py2/sklearn/manifold/mds.py
imports: import numpy
  import warnings
  from ..base import BaseEstimator
  from ..metrics import euclidean_distances
  from ..utils import check_random_state, check_array, check_symmetric
  from ..externals.joblib import Parallel
  from ..externals.joblib import delayed
  from ..isotonic import IsotonicRegression
label_desc: Use image node_id 4 for calling the MDS obj's underlying member method code with example usage: obj.fit_transform(X, y, init) and returns: self