This page

Citing

Please consider citing the scikit-learn.

9.18.3. sklearn.manifold.locally_linear_embedding

sklearn.manifold.locally_linear_embedding(X, n_neighbors, out_dim, reg=0.001, eigen_solver='auto', tol=9.9999999999999995e-07, max_iter=100, method='standard', hessian_tol=0.0001, modified_tol=9.9999999999999998e-13)

Perform a Locally Linear Embedding analysis on the data.

Parameters :

X : array-like or BallTree, shape [n_samples, n_features]

Input data, in the form of a numpy array or a precomputed BallTree.

n_neighbors : integer

number of neighbors to consider for each point.

out_dim : integer

number of coordinates for the manifold.

reg : float

regularization constant, multiplies the trace of the local covariance matrix of the distances.

eigen_solver : string, {‘auto’, ‘arpack’, ‘dense’}

auto : algorithm will attempt to choose the best method for input data arpack : use arnoldi iteration in shift-invert mode.

For this method, M may be a dense matrix, sparse matrix, or general linear operator.

dense : use standard dense matrix operations for the eigenvalue

decomposition. For this method, M must be an array or matrix type. This method should be avoided for large problems.

tol : float, optional

Tolerance for ‘arpack’ method Not used if eigen_solver==’dense’.

max_iter : integer

maximum number of iterations for the arpack solver.

method : string [‘standard’ | ‘hessian’ | ‘modified’]

standard : use the standard locally linear embedding algorithm.

see reference [1]

hessian : use the Hessian eigenmap method. This method requires

n_neighbors > out_dim * (1 + (out_dim + 1) / 2. see reference [2]

modified : use the modified locally linear embedding algorithm.

see reference [3]

ltsa : use local tangent space alignment algorithm

see reference [4]

hessian_tol : float, optional

Tolerance for Hessian eigenmapping method. Only used if method == ‘hessian’

modified_tol : float, optional

Tolerance for modified LLE method. Only used if method == ‘modified’

Returns :

Y : array-like, shape [n_samples, out_dim]

Embedding vectors.

squared_error : float

Reconstruction error for the embedding vectors. Equivalent to norm(Y - W Y, ‘fro’)**2, where W are the reconstruction weights.