topo.layouts.isomap

Module Contents

Functions

Isomap(X[, n_components, n_neighbors, metric, ...])

Isomap embedding of a graph. This is a highly efficient implementation can also operate with landmarks.

topo.layouts.isomap.Isomap(X, n_components=2, n_neighbors=50, metric='cosine', landmarks=None, landmark_method='kmeans', eig_tol=0, n_jobs=1, **kwargs)

Isomap embedding of a graph. This is a highly efficient implementation can also operate with landmarks.

Parameters:
  • X (array-like or sparse) – The input data.

  • n_components (int (optional, default 2).) – The number of componetns to embed into.

  • n_neighbors (int (optional, default 5).) – The number of neighbors to use for the geodesic distance matrix.

  • metric (str (optional, default 'euclidean').) – The metric to use for the geodesic distance matrix. Can be ‘precomputed’

  • landmarks (int or array of shape (n_samples,) (optional, default None).) – If passed as int, will obtain the number of landmarks. If passed as np.ndarray, will use the specified indexes in the array. Any value other than None will result in only the specified landmarks being used in the layout optimization, and will populate the Projector.landmarks_ slot.

  • landmark_method (str (optional, default 'kmeans').) – The method to use for selecting landmarks. If landmarks is passed as an int, this will be used to select the landmarks. Can be either ‘kmeans’ or ‘random’.

  • eig_tol (float (optional, default 0).) – Stopping criterion for eigendecomposition of the pairwise geodesics matrix.

  • n_jobs (int (optional, default 1).) – The number of jobs to use for the computation.

  • **kwargs (dict (optional, default {}).) – Additional keyword arguments to pass to the kNN function.

Returns:

Y (array of shape (n_samples, n_components)) – The embedding vectors.