Documentation
Classes
Isomap

Isomap

Isomap Embedding.

Non-linear dimensionality reduction through Isometric Mapping

Read more in the User Guide.

Python Reference (opens in a new tab)

Constructors

constructor()

Signature

new Isomap(opts?: object): Isomap;

Parameters

NameTypeDescription
opts?object-
opts.eigen_solver?"auto" | "arpack" | "dense"‘auto’ : Attempt to choose the most efficient solver for the given problem. ‘arpack’ : Use Arnoldi decomposition to find the eigenvalues and eigenvectors. ‘dense’ : Use a direct solver (i.e. LAPACK) for the eigenvalue decomposition. Default Value 'auto'
opts.max_iter?numberMaximum number of iterations for the arpack solver. not used if eigen_solver == ‘dense’.
opts.metric?anyThe metric to use when calculating distance between instances in a feature array. If metric is a string or callable, it must be one of the options allowed by sklearn.metrics.pairwise\_distances for its metric parameter. If metric is “precomputed”, X is assumed to be a distance matrix and must be square. X may be a Glossary. Default Value 'minkowski'
opts.metric_params?anyAdditional keyword arguments for the metric function.
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. If n\_neighbors is an int, then radius must be undefined. Default Value 5
opts.neighbors_algorithm?"auto" | "ball_tree" | "kd_tree" | "brute"Algorithm to use for nearest neighbors search, passed to neighbors.NearestNeighbors instance. Default Value 'auto'
opts.p?numberParameter for the Minkowski metric from sklearn.metrics.pairwise.pairwise_distances. When p = 1, this is equivalent to using manhattan_distance (l1), and euclidean_distance (l2) for p = 2. For arbitrary p, minkowski_distance (l_p) is used. Default Value 2
opts.path_method?"auto" | "FW" | "D"Method to use in finding shortest path. ‘auto’ : attempt to choose the best algorithm automatically. ‘FW’ : Floyd-Warshall algorithm. ‘D’ : Dijkstra’s algorithm. Default Value 'auto'
opts.radius?numberLimiting distance of neighbors to return. If radius is a float, then n\_neighbors must be set to undefined.
opts.tol?numberConvergence tolerance passed to arpack or lobpcg. not used if eigen_solver == ‘dense’. Default Value 0

Returns

Isomap

Defined in: generated/manifold/Isomap.ts:25 (opens in a new tab)

Properties

_isDisposed

boolean = false

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

_isInitialized

boolean = false

Defined in: generated/manifold/Isomap.ts:22 (opens in a new tab)

_py

PythonBridge

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

id

string

Defined in: generated/manifold/Isomap.ts:18 (opens in a new tab)

opts

any

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

Accessors

dist_matrix_

Stores the geodesic distance matrix of training data.

Signature

dist_matrix_(): Promise<ArrayLike>;

Returns

Promise<ArrayLike>

Defined in: generated/manifold/Isomap.ts:478 (opens in a new tab)

embedding_

Stores the embedding vectors.

Signature

embedding_(): Promise<ArrayLike>;

Returns

Promise<ArrayLike>

Defined in: generated/manifold/Isomap.ts:410 (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/Isomap.ts:524 (opens in a new tab)

kernel_pca_

KernelPCA object used to implement the embedding.

Signature

kernel_pca_(): Promise<any>;

Returns

Promise<any>

Defined in: generated/manifold/Isomap.ts:433 (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/Isomap.ts:501 (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/Isomap.ts:456 (opens in a new tab)

py

Signature

py(): PythonBridge;

Returns

PythonBridge

Defined in: generated/manifold/Isomap.ts:116 (opens in a new tab)

Signature

py(pythonBridge: PythonBridge): void;

Parameters

NameType
pythonBridgePythonBridge

Returns

void

Defined in: generated/manifold/Isomap.ts:120 (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/Isomap.ts:180 (opens in a new tab)

fit()

Compute the embedding vectors for data X.

Signature

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

Parameters

NameTypeDescription
optsobject-
opts.X?anySample data, shape = (n_samples, n_features), in the form of a numpy array, sparse matrix, precomputed tree, or NearestNeighbors object.
opts.y?anyNot used, present for API consistency by convention.

Returns

Promise<any>

Defined in: generated/manifold/Isomap.ts:197 (opens in a new tab)

fit_transform()

Fit the model from data in X and transform X.

Signature

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

Parameters

NameTypeDescription
optsobject-
opts.X?anyTraining vector, where n\_samples is the number of samples and n\_features is the number of features.
opts.y?anyNot used, present for API consistency by convention.

Returns

Promise<ArrayLike>

Defined in: generated/manifold/Isomap.ts:235 (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/Isomap.ts:275 (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/Isomap.ts:129 (opens in a new tab)

reconstruction_error()

Compute the reconstruction error for the embedding.

Signature

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

Parameters

NameTypeDescription
optsobject-
opts.reconstruction_error?numberReconstruction error.

Returns

Promise<any>

Defined in: generated/manifold/Isomap.ts:308 (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/Isomap.ts:344 (opens in a new tab)

transform()

Transform X.

This is implemented by linking the points X into the graph of geodesic distances of the training data. First the n\_neighbors nearest neighbors of X are found in the training data, and from these the shortest geodesic distances from each point in X to each point in the training data are computed in order to construct the kernel. The embedding of X is the projection of this kernel onto the embedding vectors of the training set.

Signature

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

Parameters

NameTypeDescription
optsobject-
opts.X?anyIf neighbors_algorithm=’precomputed’, X is assumed to be a distance matrix or a sparse graph of shape (n_queries, n_samples_fit).

Returns

Promise<ArrayLike>

Defined in: generated/manifold/Isomap.ts:379 (opens in a new tab)