Documentation
Classes
LocallyLinearEmbedding

LocallyLinearEmbedding

Locally Linear Embedding.

Read more in the User Guide.

Python Reference (opens in a new tab)

Constructors

constructor()

Signature

new LocallyLinearEmbedding(opts?: object): LocallyLinearEmbedding;

Parameters

NameTypeDescription
opts?object-
opts.eigen_solver?"auto" | "arpack" | "dense"The solver used to compute the eigenvectors. The available options are: Default Value 'auto'
opts.hessian_tol?numberTolerance for Hessian eigenmapping method. Only used if method \== 'hessian'. Default Value 0.0001
opts.max_iter?numberMaximum number of iterations for the arpack solver. Not used if eigen_solver==’dense’. Default Value 100
opts.method?"standard" | "hessian" | "modified" | "ltsa"standard: use the standard locally linear embedding algorithm. see reference [1] Default Value 'standard'
opts.modified_tol?numberTolerance for modified LLE method. Only used if method \== 'modified'. Default Value 1e-12
opts.n_components?numberNumber of coordinates for the manifold. Default Value 2
opts.n_jobs?numberThe number of parallel jobs to run. undefined means 1 unless in a joblib.parallel\_backend (opens in a new tab) context. \-1 means using all processors. See Glossary for more details.
opts.n_neighbors?numberNumber of neighbors to consider for each point. Default Value 5
opts.neighbors_algorithm?"auto" | "ball_tree" | "kd_tree" | "brute"Algorithm to use for nearest neighbors search, passed to NearestNeighbors instance. Default Value 'auto'
opts.random_state?numberDetermines the random number generator when eigen\_solver == ‘arpack’. Pass an int for reproducible results across multiple function calls. See Glossary.
opts.reg?numberRegularization constant, multiplies the trace of the local covariance matrix of the distances. Default Value 0.001
opts.tol?numberTolerance for ‘arpack’ method Not used if eigen_solver==’dense’. Default Value 0.000001

Returns

LocallyLinearEmbedding

Defined in: generated/manifold/LocallyLinearEmbedding.ts:23 (opens in a new tab)

Properties

_isDisposed

boolean = false

Defined in: generated/manifold/LocallyLinearEmbedding.ts:21 (opens in a new tab)

_isInitialized

boolean = false

Defined in: generated/manifold/LocallyLinearEmbedding.ts:20 (opens in a new tab)

_py

PythonBridge

Defined in: generated/manifold/LocallyLinearEmbedding.ts:19 (opens in a new tab)

id

string

Defined in: generated/manifold/LocallyLinearEmbedding.ts:16 (opens in a new tab)

opts

any

Defined in: generated/manifold/LocallyLinearEmbedding.ts:17 (opens in a new tab)

Accessors

embedding_

Stores the embedding vectors

Signature

embedding_(): Promise<ArrayLike>;

Returns

Promise<ArrayLike>

Defined in: generated/manifold/LocallyLinearEmbedding.ts:395 (opens in a new tab)

feature_names_in_

Names of features seen during fit. Defined only when X has feature names that are all strings.

Signature

feature_names_in_(): Promise<ArrayLike>;

Returns

Promise<ArrayLike>

Defined in: generated/manifold/LocallyLinearEmbedding.ts:476 (opens in a new tab)

n_features_in_

Number of features seen during fit.

Signature

n_features_in_(): Promise<number>;

Returns

Promise<number>

Defined in: generated/manifold/LocallyLinearEmbedding.ts:449 (opens in a new tab)

nbrs_

Stores nearest neighbors instance, including BallTree or KDtree if applicable.

Signature

nbrs_(): Promise<any>;

Returns

Promise<any>

Defined in: generated/manifold/LocallyLinearEmbedding.ts:503 (opens in a new tab)

py

Signature

py(): PythonBridge;

Returns

PythonBridge

Defined in: generated/manifold/LocallyLinearEmbedding.ts:108 (opens in a new tab)

Signature

py(pythonBridge: PythonBridge): void;

Parameters

NameType
pythonBridgePythonBridge

Returns

void

Defined in: generated/manifold/LocallyLinearEmbedding.ts:112 (opens in a new tab)

reconstruction_error_

Reconstruction error associated with embedding\_

Signature

reconstruction_error_(): Promise<number>;

Returns

Promise<number>

Defined in: generated/manifold/LocallyLinearEmbedding.ts:422 (opens in a new tab)

Methods

dispose()

Disposes of the underlying Python resources.

Once dispose() is called, the instance is no longer usable.

Signature

dispose(): Promise<void>;

Returns

Promise<void>

Defined in: generated/manifold/LocallyLinearEmbedding.ts:179 (opens in a new tab)

fit()

Compute the embedding vectors for data X.

Signature

fit(opts: object): Promise<any>;

Parameters

NameTypeDescription
optsobject-
opts.X?ArrayLike[]Training set.
opts.y?anyNot used, present here for API consistency by convention.

Returns

Promise<any>

Defined in: generated/manifold/LocallyLinearEmbedding.ts:196 (opens in a new tab)

fit_transform()

Compute the embedding vectors for data X and transform X.

Signature

fit_transform(opts: object): Promise<ArrayLike>;

Parameters

NameTypeDescription
optsobject-
opts.X?ArrayLike[]Training set.
opts.y?anyNot used, present here for API consistency by convention.

Returns

Promise<ArrayLike>

Defined in: generated/manifold/LocallyLinearEmbedding.ts:236 (opens in a new tab)

get_feature_names_out()

Get output feature names for transformation.

The feature names out will prefixed by the lowercased class name. For example, if the transformer outputs 3 features, then the feature names out are: \["class\_name0", "class\_name1", "class\_name2"\].

Signature

get_feature_names_out(opts: object): Promise<any>;

Parameters

NameTypeDescription
optsobject-
opts.input_features?anyOnly used to validate feature names with the names seen in fit.

Returns

Promise<any>

Defined in: generated/manifold/LocallyLinearEmbedding.ts:281 (opens in a new tab)

init()

Initializes the underlying Python resources.

This instance is not usable until the Promise returned by init() resolves.

Signature

init(py: PythonBridge): Promise<void>;

Parameters

NameType
pyPythonBridge

Returns

Promise<void>

Defined in: generated/manifold/LocallyLinearEmbedding.ts:121 (opens in a new tab)

set_output()

Set output container.

See Introducing the set_output API for an example on how to use the API.

Signature

set_output(opts: object): Promise<any>;

Parameters

NameTypeDescription
optsobject-
opts.transform?"default" | "pandas"Configure output of transform and fit\_transform.

Returns

Promise<any>

Defined in: generated/manifold/LocallyLinearEmbedding.ts:321 (opens in a new tab)

transform()

Transform new points into embedding space.

Signature

transform(opts: object): Promise<ArrayLike[]>;

Parameters

NameTypeDescription
optsobject-
opts.X?ArrayLike[]Training set.

Returns

Promise<ArrayLike[]>

Defined in: generated/manifold/LocallyLinearEmbedding.ts:358 (opens in a new tab)