Skip to contents

Classical MDS on shortest-path distances through a nearest-neighbour graph, approximating geodesics on the manifold. On a Swiss roll two points on facing sheets are close in space but far along the surface, and only the graph distance knows the difference.

Usage

morie_esl_isomap(X, k = 2, neighbors = 5)

Arguments

X

Data, n by p.

k

Embedding dimension.

neighbors

Neighbourhood size.

Value

List with embedding, eigenvalues, geodesic, residual_variance.

Details

The neighbourhood size is the weak spot: too small and the graph disconnects (the embedding is then undefined, and that is raised rather than filled in); too large and it short-circuits across a fold, silently reintroducing the Euclidean distance the method exists to avoid.

References

Tenenbaum, J. B., de Silva, V., & Langford, J. C. (2000). Science 290(5500), 2319-2323.

Examples

set.seed(1)
tt <- runif(200, 1.5 * pi, 4.5 * pi)
X <- cbind(tt * cos(tt), runif(200, 0, 10), tt * sin(tt))
abs(stats::cor(morie_esl_isomap(X, k = 2, neighbors = 8)$embedding[, 1], tt)) > 0.9
#> [1] FALSE