Unsupervised LearningNon-Linear Manifold LearningDimensionality Reduction

UMAP

Primary task · Dimensionality Reduction

UMAP is an unsupervised learning method in the non-linear manifold learning family. This page summarizes its mechanism, practical uses, important trade-offs, and a browser-based concept explorer.

← Directory
Visual intuition

From data to learned behaviour

UMAP converts patterns in observed data into a reusable prediction or representation rule. The most useful way to understand it is to watch what internal structure changes during training and how that learned structure changes outputs.

Infographic
1Data2Initial state3Optimise4Validate5InferenceTraining transforms evidence into a reusable model state
Conceptual simulation

Watch the learning mechanism form

The structure below is synchronized with the same training state used by the prediction simulation.

Mechanism view
Training control centre

Control both simulations together

Reset regenerates the synthetic data and model state. Train animates to completion. Pause freezes the animation. Train Step advances one learning stage.

Step 0 / 12
Model simulation

Inspect the learned prediction / representation

Synthetic data are generated locally in your browser.

Model description

Understand UMAP after watching it learn

This section connects the animation to the actual statistical or computational idea behind the model.

Deep description

UMAP UMAP is an unsupervised learning method in the non-linear manifold learning family. This page summarizes its mechanism, practical uses, important trade-offs, and a browser-based concept explorer.

What is learned. During training, the algorithm builds or adjusts the parameters and internal representation used by UMAP. The core learning mechanism is: Constructs a fuzzy simplicial set representation of high-dimensional data and optimizes low-dimensional embedding preserving both local and global topology.

How training becomes inference. Prepare data → initialise the model state → evaluate the current objective → update parameters or structure → validate progress → use the final state for inference. Once training stops, the fitted state is reused on unseen inputs rather than being reconstructed from scratch. The resulting output is: A lower-dimensional embedding or transformed representation designed to preserve selected structure.

Why practitioners use it. Significantly faster than t-SNE, preserves global structure much better, scales to large datasets. Typical fits include Single-cell RNA sequencing visualization, embedding space exploration, high-dimensional clustering prep.

What to verify before trusting it. Non-deterministic; sensitive to hyperparameters (n_neighbors, min_dist); distances between clusters cannot be strictly interpreted. The visual simulation is intentionally simplified, so real use should still validate preprocessing, data independence, hyperparameters, uncertainty and task-appropriate metrics.

Internal statethe parameters and internal representation used by UMAP
Typical outputA lower-dimensional embedding or transformed representation designed to preserve selected structure.
Good fitSingle-cell RNA sequencing visualization, embedding space exploration, high-dimensional clustering prep.
Main cautionNon-deterministic; sensitive to hyperparameters (n_neighbors, min_dist); distances between clusters cannot be strictly interpreted.
1Training data→
2Learning objective→
3Internal model state→
4Prediction / representation→
5Evaluation
Intuition

What the model is trying to learn

UMAP converts patterns in observed data into a reusable prediction or representation rule. The most useful way to understand it is to watch what internal structure changes during training and how that learned structure changes outputs.

Mathematical lens

Core logic

Constructs a fuzzy simplicial set representation of high-dimensional data and optimizes low-dimensional embedding preserving both local and global topology. The mathematical objective determines which model states are considered better, while regularisation and validation constrain how much complexity should be trusted.

Training sequence

How learning progresses

Prepare data → initialise the model state → evaluate the current objective → update parameters or structure → validate progress → use the final state for inference.

Original mechanism

Taxonomy description

Constructs a fuzzy simplicial set representation of high-dimensional data and optimizes low-dimensional embedding preserving both local and global topology.

Evaluation guide

How to evaluate this model responsibly

ValidationChoose validation that matches the independence assumptions of the data.
MetricsUse task-specific primary and complementary metrics.
HPOEstablish a baseline first, then search the parameters that materially change capacity.
Post-processingValidate any downstream transformation on held-out data.
Hyperparameters

Key parameters

n_neighborsTypical: 15

Local neighborhood size.

min_distTypical: 0.1

Minimum separation in the embedding.

n_componentsTypical: 2

Embedding dimension.

metricTypical: euclidean

Distance measure in source space.

Use & trade-offs

Where it fits

Typical applications

Single-cell RNA sequencing visualization, embedding space exploration, high-dimensional clustering prep.

Strengths

Significantly faster than t-SNE, preserves global structure much better, scales to large datasets.

Limitations

Non-deterministic; sensitive to hyperparameters (n_neighbors, min_dist); distances between clusters cannot be strictly interpreted.

Code example

Minimal Python implementation

from sklearn.datasets import load_iris

X, y = load_iris(return_X_y=True)
print("STEP 1 · original shape:", X.shape)
try:
    from umap import UMAP
except ImportError as exc:
    raise SystemExit("Install UMAP with: pip install umap-learn") from exc
model = UMAP(n_components=2, n_neighbors=15, min_dist=.1, random_state=42)
Z = model.fit_transform(X)
print("STEP 2 · embedding shape:", Z.shape)
print("STEP 3 · first point:", Z[0].round(2).tolist())
Expected / representative output
STEP 1 · original shape: (150, 4)
STEP 2 · embedding shape: (150, 2)
STEP 3 · first point: [representative 2D coordinates]