Isomap Embedding
Non-linear dimensionality reduction through Isometric Mapping
Read more in the :ref:`User Guide <isomap>`.
Parameters ---------- n_neighbors : integer number of neighbors to consider for each point.
n_components : integer number of coordinates for the manifold
eigen_solver : 'auto'|'arpack'|'dense'
'auto' : Attempt to choose the most efficient solver for the given problem.
'arpack' : Use Arnoldi decomposition to find the eigenvalues and eigenvectors.
'dense' : Use a direct solver (i.e. LAPACK) for the eigenvalue decomposition.
tol : float Convergence tolerance passed to arpack or lobpcg. not used if eigen_solver == 'dense'.
max_iter : integer Maximum number of iterations for the arpack solver. not used if eigen_solver == 'dense'.
path_method : string 'auto'|'FW'|'D'
Method to use in finding shortest path.
'auto' : attempt to choose the best algorithm automatically.
'FW' : Floyd-Warshall algorithm.
'D' : Dijkstra's algorithm.
neighbors_algorithm : string 'auto'|'brute'|'kd_tree'|'ball_tree'
Algorithm to use for nearest neighbors search, passed to neighbors.NearestNeighbors instance.
n_jobs : int or None, default=None The number of parallel jobs to run. ``None`` means 1 unless in a :obj:`joblib.parallel_backend` context. ``-1`` means using all processors. See :term:`Glossary <n_jobs>` for more details.
metric : string, or callable, default="minkowski" The metric to use when calculating distance between instances in a feature array. If metric is a string or callable, it must be one of the options allowed by :func:`sklearn.metrics.pairwise_distances` for its metric parameter. If metric is "precomputed", X is assumed to be a distance matrix and must be square. X may be a :term:`Glossary <sparse graph>`.
.. versionadded:: 0.22
p : int, default=2 Parameter for the Minkowski metric from sklearn.metrics.pairwise.pairwise_distances. When p = 1, this is equivalent to using manhattan_distance (l1), and euclidean_distance (l2) for p = 2. For arbitrary p, minkowski_distance (l_p) is used.
.. versionadded:: 0.22
metric_params : dict, default=None Additional keyword arguments for the metric function.
.. versionadded:: 0.22
Attributes ---------- embedding_ : array-like, shape (n_samples, n_components) Stores the embedding vectors.
kernel_pca_ : object :class:`~sklearn.decomposition.KernelPCA` object used to implement the embedding.
nbrs_ : sklearn.neighbors.NearestNeighbors instance Stores nearest neighbors instance, including BallTree or KDtree if applicable.
dist_matrix_ : array-like, shape (n_samples, n_samples) Stores the geodesic distance matrix of training data.
Examples -------- >>> from sklearn.datasets import load_digits >>> from sklearn.manifold import Isomap >>> X, _ = load_digits(return_X_y=True) >>> X.shape (1797, 64) >>> embedding = Isomap(n_components=2) >>> X_transformed = embedding.fit_transform(X:100
) >>> X_transformed.shape (100, 2)
References ----------
.. 1
Tenenbaum, J.B.; De Silva, V.; & Langford, J.C. A global geometric framework for nonlinear dimensionality reduction. Science 290 (5500)