Class: LocallyLinearEmbedding
Locally Linear Embedding.
Read more in the User Guide.
Constructors
new LocallyLinearEmbedding()
new LocallyLinearEmbedding(
opts
?):LocallyLinearEmbedding
Parameters
Parameter | Type | Description |
---|---|---|
opts ? | object | - |
opts.eigen_solver ? | "auto" | "arpack" | "dense" | The solver used to compute the eigenvectors. The available options are: |
opts.hessian_tol ? | number | Tolerance for Hessian eigenmapping method. Only used if method \== 'hessian' . |
opts.max_iter ? | number | Maximum number of iterations for the arpack solver. Not used if eigen_solver==’dense’. |
opts.method ? | "standard" | "hessian" | "modified" | "ltsa" | standard : use the standard locally linear embedding algorithm. see reference [1] |
opts.modified_tol ? | number | Tolerance for modified LLE method. Only used if method \== 'modified' . |
opts.n_components ? | number | Number of coordinates for the manifold. |
opts.n_jobs ? | number | The number of parallel jobs to run. undefined means 1 unless in a joblib.parallel_backend context. \-1 means using all processors. See Glossary for more details. |
opts.n_neighbors ? | number | Number of neighbors to consider for each point. |
opts.neighbors_algorithm ? | "auto" | "ball_tree" | "kd_tree" | "brute" | Algorithm to use for nearest neighbors search, passed to NearestNeighbors instance. |
opts.random_state ? | number | Determines the random number generator when eigen_solver == ‘arpack’. Pass an int for reproducible results across multiple function calls. See Glossary. |
opts.reg ? | number | Regularization constant, multiplies the trace of the local covariance matrix of the distances. |
opts.tol ? | number | Tolerance for ‘arpack’ method Not used if eigen_solver==’dense’. |
Returns LocallyLinearEmbedding
Defined in generated/manifold/LocallyLinearEmbedding.ts:23
Properties
Property | Type | Default value | Defined in |
---|---|---|---|
_isDisposed | boolean | false | generated/manifold/LocallyLinearEmbedding.ts:21 |
_isInitialized | boolean | false | generated/manifold/LocallyLinearEmbedding.ts:20 |
_py | PythonBridge | undefined | generated/manifold/LocallyLinearEmbedding.ts:19 |
id | string | undefined | generated/manifold/LocallyLinearEmbedding.ts:16 |
opts | any | undefined | generated/manifold/LocallyLinearEmbedding.ts:17 |
Accessors
embedding_
Get Signature
get embedding_():
Promise
<ArrayLike
>
Stores the embedding vectors
Returns Promise
<ArrayLike
>
Defined in generated/manifold/LocallyLinearEmbedding.ts:411
feature_names_in_
Get Signature
get feature_names_in_():
Promise
<ArrayLike
>
Names of features seen during fit. Defined only when X
has feature names that are all strings.
Returns Promise
<ArrayLike
>
Defined in generated/manifold/LocallyLinearEmbedding.ts:492
n_features_in_
Get Signature
get n_features_in_():
Promise
<number
>
Number of features seen during fit.
Returns Promise
<number
>
Defined in generated/manifold/LocallyLinearEmbedding.ts:465
nbrs_
Get Signature
get nbrs_():
Promise
<any
>
Stores nearest neighbors instance, including BallTree or KDtree if applicable.
Returns Promise
<any
>
Defined in generated/manifold/LocallyLinearEmbedding.ts:519
py
Get Signature
get py():
PythonBridge
Returns PythonBridge
Set Signature
set py(
pythonBridge
):void
Parameters
Parameter | Type |
---|---|
pythonBridge | PythonBridge |
Returns void
Defined in generated/manifold/LocallyLinearEmbedding.ts:108
reconstruction_error_
Get Signature
get reconstruction_error_():
Promise
<number
>
Reconstruction error associated with embedding_
Returns Promise
<number
>
Defined in generated/manifold/LocallyLinearEmbedding.ts:438
Methods
dispose()
dispose():
Promise
<void
>
Disposes of the underlying Python resources.
Once dispose()
is called, the instance is no longer usable.
Returns Promise
<void
>
Defined in generated/manifold/LocallyLinearEmbedding.ts:164
fit()
fit(
opts
):Promise
<any
>
Compute the embedding vectors for data X.
Parameters
Parameter | Type | Description |
---|---|---|
opts | object | - |
opts.X ? | ArrayLike [] | Training set. |
opts.y ? | any | Not used, present here for API consistency by convention. |
Returns Promise
<any
>
Defined in generated/manifold/LocallyLinearEmbedding.ts:181
fit_transform()
fit_transform(
opts
):Promise
<ArrayLike
>
Compute the embedding vectors for data X and transform X.
Parameters
Parameter | Type | Description |
---|---|---|
opts | object | - |
opts.X ? | ArrayLike [] | Training set. |
opts.y ? | any | Not used, present here for API consistency by convention. |
Returns Promise
<ArrayLike
>
Defined in generated/manifold/LocallyLinearEmbedding.ts:220
get_feature_names_out()
get_feature_names_out(
opts
):Promise
<any
>
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"\]
.
Parameters
Parameter | Type | Description |
---|---|---|
opts | object | - |
opts.input_features ? | any | Only used to validate feature names with the names seen in fit . |
Returns Promise
<any
>
Defined in generated/manifold/LocallyLinearEmbedding.ts:263
get_metadata_routing()
get_metadata_routing(
opts
):Promise
<any
>
Get metadata routing of this object.
Please check User Guide on how the routing mechanism works.
Parameters
Parameter | Type | Description |
---|---|---|
opts | object | - |
opts.routing ? | any | A MetadataRequest encapsulating routing information. |
Returns Promise
<any
>
Defined in generated/manifold/LocallyLinearEmbedding.ts:301
init()
init(
py
):Promise
<void
>
Initializes the underlying Python resources.
This instance is not usable until the Promise
returned by init()
resolves.
Parameters
Parameter | Type |
---|---|
py | PythonBridge |
Returns Promise
<void
>
Defined in generated/manifold/LocallyLinearEmbedding.ts:121
set_output()
set_output(
opts
):Promise
<any
>
Set output container.
See Introducing the set_output API for an example on how to use the API.
Parameters
Parameter | Type | Description |
---|---|---|
opts | object | - |
opts.transform ? | "default" | "pandas" | "polars" | Configure output of transform and fit_transform . |
Returns Promise
<any
>
Defined in generated/manifold/LocallyLinearEmbedding.ts:339
transform()
transform(
opts
):Promise
<ArrayLike
[]>
Transform new points into embedding space.
Parameters
Parameter | Type | Description |
---|---|---|
opts | object | - |
opts.X ? | ArrayLike [] | Training set. |
Returns Promise
<ArrayLike
[]>
Defined in generated/manifold/LocallyLinearEmbedding.ts:375