Skip to content
StackDecode
AI & ML Atlas
Machine LearningalgorithmAnimated walkthrough

UMAP

A faster neighbour-preserving 2-D embedding that keeps more global structure.

The idea

UMAP builds a weighted graph of nearest neighbours, then optimises a low-dimensional layout so that its graph is as similar as possible, using attractive forces between neighbours and repulsive forces between random pairs. It is typically faster than t-SNE and can embed to more than two dimensions.

Watch it run

The pipeline lights up one step at a time. Use the controls to pause or step through it.

  1. 1Find each point's nearest neighbours.
  2. 2Turn distances into fuzzy edge weights, forming a graph.
  3. 3Initialise a low-dimensional layout (spectral).
  4. 4Pull connected points together and push random pairs apart (stochastic gradient descent).
1/4

Step by step

  1. 1Find each point's nearest neighbours.
  2. 2Turn distances into fuzzy edge weights, forming a graph.
  3. 3Initialise a low-dimensional layout (spectral).
  4. 4Pull connected points together and push random pairs apart (stochastic gradient descent).

Where it is used

Single-cell biology, embedding visualisation, pre-processing.

Watch out for

Still a distortion: distances in the plot are not exact, and parameters (n_neighbors, min_dist) change the picture.

Related