Class LLE

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

public class LLE extends Object implements Serializable
Locally Linear Embedding. It has several advantages over Isomap, including faster optimization when implemented to take advantage of sparse matrix algorithms, and better results with many problems. LLE also begins by finding a set of the nearest neighbors of each point. It then computes a set of weights for each point that best describe the point as a linear combination of its neighbors. Finally, it uses an eigenvector-based optimization technique to find the low-dimensional embedding of points, such that each point is still described with the same linear combination of its neighbors. LLE tends to handle non-uniform sample densities poorly because there is no fixed unit to prevent the weights from drifting as various regions differ in sample densities.
See Also:
  • Field Summary

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

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

    Modifier and Type
    Method
    Description
    static LLE
    of(double[][] data, int k)
    Runs the LLE algorithm.
    static LLE
    of(double[][] data, int k, int d)
    Runs the LLE 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
      Nearest neighbor graph.
  • Constructor Details

    • LLE

      public LLE(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 LLE of(double[][] data, int k)
      Runs the LLE algorithm.
      Parameters:
      data - the input data.
      k - k-nearest neighbor.
      Returns:
      the model.
    • of

      public static LLE of(double[][] data, int k, int d)
      Runs the LLE algorithm.
      Parameters:
      data - the input data.
      k - k-nearest neighbor.
      d - the dimension of the manifold.
      Returns:
      the model.