Class IsoMap

java.lang.Object
smile.manifold.IsoMap
All Implemented Interfaces:
Serializable

public class IsoMap extends Object implements Serializable
Isometric feature mapping. Isomap is a widely used low-dimensional embedding methods, where geodesic distances on a weighted graph are incorporated with the classical multidimensional scaling. Isomap is used for computing a quasi-isometric, low-dimensional embedding of a set of high-dimensional data points. Isomap is highly efficient and generally applicable to a broad range of data sources and dimensionalities.

To be specific, the classical MDS performs low-dimensional embedding based on the pairwise distance between data points, which is generally measured using straight-line Euclidean distance. Isomap is distinguished by its use of the geodesic distance induced by a neighborhood graph embedded in the classical scaling. This is done to incorporate manifold structure in the resulting embedding. Isomap defines the geodesic distance to be the sum of edge weights along the shortest path between two nodes. The top n eigenvectors of the geodesic distance matrix, represent the coordinates in the new n-dimensional Euclidean space.

The connectivity of each data point in the neighborhood graph is defined as its nearest k Euclidean neighbors in the high-dimensional space. This step is vulnerable to "short-circuit errors" if k is too large with respect to the manifold structure or if noise in the data moves the points slightly off the manifold. Even a single short-circuit error can alter many entries in the geodesic distance matrix, which in turn can lead to a drastically different (and incorrect) low-dimensional embedding. Conversely, if k is too small, the neighborhood graph may become too sparse to approximate geodesic paths accurately.

This class implements C-Isomap that involves magnifying the regions of high density and shrink the regions of low density of data points in the manifold. Edge weights that are maximized in Multi-Dimensional Scaling(MDS) are modified, with everything else remaining unaffected.

See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final double[][]
    The coordinate matrix in embedding space.
    The nearest neighbor graph.
    final int[]
    The original sample index.
  • Constructor Summary

    Constructors
    Constructor
    Description
    IsoMap(int[] index, double[][] coordinates, AdjacencyList graph)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    static IsoMap
    of(double[][] data, int k)
    Runs the C-Isomap algorithm with Euclidean distance.
    static IsoMap
    of(double[][] data, int k, int d, boolean conformal)
    Runs the Isomap algorithm.
    static <T> IsoMap
    of(T[] data, Distance<T> distance, int k)
    Runs the C-Isomap algorithm.
    static <T> IsoMap
    of(T[] data, Distance<T> distance, int k, int d, boolean conformal)
    Runs the Isomap algorithm.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • index

      public final int[] index
      The original sample index.
    • coordinates

      public final double[][] coordinates
      The coordinate matrix in embedding space.
    • graph

      public final AdjacencyList graph
      The nearest neighbor graph.
  • Constructor Details

    • IsoMap

      public IsoMap(int[] index, double[][] coordinates, AdjacencyList graph)
      Constructor.
      Parameters:
      index - the original sample index.
      coordinates - the coordinates.
      graph - the nearest neighbor graph.
  • Method Details

    • of

      public static IsoMap of(double[][] data, int k)
      Runs the C-Isomap algorithm with Euclidean distance.
      Parameters:
      data - the input data.
      k - k-nearest neighbor.
      Returns:
      the model.
    • of

      public static IsoMap of(double[][] data, int k, int d, boolean conformal)
      Runs the Isomap algorithm.
      Parameters:
      data - the input data.
      k - k-nearest neighbor.
      d - the dimension of the manifold.
      conformal - C-Isomap algorithm if true, otherwise standard algorithm.
      Returns:
      the model.
    • of

      public static <T> IsoMap of(T[] data, Distance<T> distance, int k)
      Runs the C-Isomap algorithm.
      Type Parameters:
      T - the data type of points.
      Parameters:
      data - the input data.
      distance - the distance function.
      k - k-nearest neighbor.
      Returns:
      the model.
    • of

      public static <T> IsoMap of(T[] data, Distance<T> distance, int k, int d, boolean conformal)
      Runs the Isomap algorithm.
      Type Parameters:
      T - the data type of points.
      Parameters:
      data - the input data.
      distance - the distance function.
      k - k-nearest neighbor.
      d - the dimension of the manifold.
      conformal - C-Isomap algorithm if true, otherwise standard algorithm.
      Returns:
      the model.