Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

Isomap-class

Isomap embedding


Description

An S4 Class implementing the Isomap Algorithm

Details

The Isomap algorithm approximates a manifold using geodesic distances on a k nearest neighbor graph. Then classical scaling is performed on the resulting distance matrix.

Slots

fun

A function that does the embedding and returns a dimRedResult object.

stdpars

The standard parameters for the function.

General usage

Dimensionality reduction methods are S4 Classes that either be used directly, in which case they have to be initialized and a full list with parameters has to be handed to the @fun() slot, or the method name be passed to the embed function and parameters can be given to the ..., in which case missing parameters will be replaced by the ones in the @stdpars.

Parameters

Isomap can take the following parameters:

knn

The number of nearest neighbors in the graph. Defaults to 50.

ndim

The number of embedding dimensions, defaults to 2.

get_geod

Should the geodesic distance matrix be kept, if TRUE, access it as getOtherData(x)$geod

Implementation

The dimRed package uses its own implementation of Isomap which also comes with an out of sample extension (known as landmark Isomap). The default Isomap algorithm scales computationally not very well, the implementation here uses nn2 for a faster search of the nearest neighbors. If data are too large it may be useful to fit a subsample of the data and use the out-of-sample extension for the other points.

References

Tenenbaum, J.B., Silva, V. de, Langford, J.C., 2000. A Global Geometric Framework for Nonlinear Dimensionality Reduction. Science 290, 2319-2323. https://doi.org/10.1126/science.290.5500.2319

See Also

Examples

dat <- loadDataSet("3D S Curve", n = 500)

## use the S4 Class directly:
isomap <- Isomap()
emb <- isomap@fun(dat, isomap@stdpars)

## or simpler, use embed():
samp <- sample(nrow(dat), size = 200)
emb2 <- embed(dat[samp], "Isomap", .mute = NULL, knn = 10)
emb3 <- emb2@apply(dat[-samp])

plot(emb2, type = "2vars")
plot(emb3, type = "2vars")

dimRed

A Framework for Dimensionality Reduction

v0.2.3
GPL-3 | file LICENSE
Authors
Guido Kraemer [aut, cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.