77  ISOMAP

Isometric mapping (ISOMAP) is a non-linear dimensionality reduction method, much like UMAP. It is another method that uses distances between points to produce graphs of neighboring points. What diffirentiate this method from the others is that it uses geodesic distances as opposed to straight-line distances. where the geodesic distance is the sum of edge weights along the shortest path between two points.

The eigenvectors of the deodesic distance metric are then used to represent the new coordinates.

A very high-level description of the Isomap algorithm is given below:

  1. Find the neighbors for each point
  2. Construct the neighborhood graph, using Euclidean distance as edge length
  3. Calculate the shortest path between each pair of points
  4. Use Multidimensional scaling to compute a lower-dimensional embedding

77.2 Pros and Cons

77.2.1 Pros

Captures non-linear effects Captures long-range structure, not just local structure No parameters to set other than neighbors

77.2.2 Cons

Computationally expensive Assumes a single connected manifold

77.3 R Examples

We will be using the ames data set for these examples.

library(recipes)
library(modeldata)

ames_num <- ames |>
  select(where(is.numeric))

{embed} provides step_isomap(), which is the standard way to perform isomap.

isomap_rec <- recipe(~ ., data = ames_num) |>
  step_normalize(all_numeric_predictors()) |>
  step_isomap(all_numeric_predictors(), num_terms = 5)

isomap_rec |>
  prep() |>
  bake(new_data = NULL) |>
  glimpse()
2026-01-18 15:20:52.518921: Isomap START
2026-01-18 15:20:52.519147: constructing knn graph
2026-01-18 15:20:52.868405: calculating geodesic distances
2026-01-18 15:20:56.909158: Classical Scaling
Rows: 2,930
Columns: 5
$ Isomap1 <dbl> -1.16255521, 7.89024972, 4.22539685, -4.27462638, -4.00849056,…
$ Isomap2 <dbl> -5.9998701, -1.5275619, -0.1395389, -4.6306931, 3.1154497, 3.9…
$ Isomap3 <dbl> 0.30828055, -0.66514307, -1.33846951, 0.94110231, -4.69628360,…
$ Isomap4 <dbl> -3.24689514, -0.20431227, 0.24079306, -2.40100738, 1.19026005,…
$ Isomap5 <dbl> -3.063345784, -2.047834184, 6.769161285, -3.951998366, -0.7214…

77.4 Python Examples

WIP