lale.lib.autogen.locally_linear_embedding module

class lale.lib.autogen.locally_linear_embedding.LocallyLinearEmbedding(*, n_neighbors=5, n_components=2, reg=0.001, eigen_solver='auto', tol=1e-06, max_iter=100, method='standard', hessian_tol=0.0001, modified_tol=1e-12, neighbors_algorithm='auto', random_state=None, n_jobs=1)

Bases: PlannedIndividualOp

Combined schema for expected data and hyperparameters.

This documentation is auto-generated from JSON schemas.

Parameters
  • n_neighbors (integer, >=5 for optimizer, <=20 for optimizer, uniform distribution, default 5) – number of neighbors to consider for each point.

  • n_components (integer, >=2 for optimizer, <='X/items/maxItems', <=256 for optimizer, uniform distribution, default 2) – number of coordinates for the manifold

  • reg (float, not for optimizer, default 0.001) – regularization constant, multiplies the trace of the local covariance matrix of the distances.

  • eigen_solver (‘auto’, ‘arpack’, or ‘dense’, default ‘auto’) – auto : algorithm will attempt to choose the best method for input data arpack : use arnoldi iteration in shift-invert mode

  • tol (float, >=1e-08 for optimizer, <=0.01 for optimizer, default 1e-06) – Tolerance for ‘arpack’ method Not used if eigen_solver==’dense’.

  • max_iter (integer, >=10 for optimizer, <=1000 for optimizer, uniform distribution, default 100) – maximum number of iterations for the arpack solver

  • method (‘ltsa’, ‘modified’, ‘standard’, or ‘hessian’, default ‘standard’) –

    standard : use the standard locally linear embedding algorithm

    See also constraint-1, constraint-2, constraint-3, constraint-3.

  • hessian_tol (float, not for optimizer, default 0.0001) –

    Tolerance for Hessian eigenmapping method

    See also constraint-1.

  • modified_tol (float, not for optimizer, default 1e-12) –

    Tolerance for modified LLE method

    See also constraint-2.

  • neighbors_algorithm (‘auto’, ‘brute’, ‘kd_tree’, or ‘ball_tree’, default ‘auto’) – algorithm to use for nearest neighbors search, passed to neighbors.NearestNeighbors instance

  • random_state (union type, not for optimizer, default None) –

    If int, random_state is the seed used by the random number generator; If RandomState instance, random_state is the random number generator; If None, the random number generator is the RandomState instance used by np.random

    • integer

    • or numpy.random.RandomState

    • or None

  • n_jobs (union type, not for optimizer, default 1) –

    The number of parallel jobs to run

    • integer

    • or None

Notes

constraint-1 : union type

hessian_tol, only used if method == ‘hessian’

  • hessian_tol : 0.0001

  • or method : ‘hessian’

constraint-2 : union type

modified_tol, only used if method == ‘modified’

  • modified_tol : 1e-12

  • or method : ‘modified’

constraint-3 : union type

for method=’hessian’, n_neighbors must be greater than [n_components * (n_components + 3) / 2]

  • method : ‘standard’

  • or method : negated type of ‘hessian’

  • or any type

constraint-4 : negated type of ‘X/isSparse’

A sparse matrix was passed, but dense data is required. Use X.toarray() to convert to a dense numpy array.)

fit(X, y=None, **fit_params)

Train the operator.

Note: The fit method is not available until this operator is trainable.

Once this method is available, it will have the following signature:

Parameters
  • X (array of items : array of items : float) – training set.

  • y (any type) –

transform(X, y=None)

Transform the data.

Note: The transform method is not available until this operator is trained.

Once this method is available, it will have the following signature:

Parameters

X (array of items : array of items : float) –

Returns

result – Transform new points into embedding space.

Return type

array of items : array of items : float