R: Isomap embedding

Isomap-class {dimRed} | R Documentation

## 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.

### 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 neares 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.

### See Also

Other dimensionality reduction methods: `DRR-class`, `DiffusionMaps-class`, `DrL-class`, `FastICA-class`, `FruchtermanReingold-class`, `HLLE-class`, `KamadaKawai-class`, `LLE-class`, `MDS-class`, `PCA-class`, `dimRedMethod-class`, `kPCA-class`, `nMDS-class`, `tSNE-class`

### 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")

[Package dimRed version 0.1.0 Index]