Skip to content
ExtendedSource checked

UMAP

Embeds high-dimensional data into a lower-dimensional layout that preserves local neighborhoods.

Quick Facts

Compact metadata for implementation and discovery.

Category
Machine Learning
Difficulty
Advanced
Family
Dimensionality Reduction
Tier
Extended
Status
Verified
Review
Source Checked
Sources
1
Formulas
1
Relationships
3
Code example
Ready
Visualization
Ready

Overview

UMAP builds a fuzzy neighbor graph from high-dimensional data and optimizes a low-dimensional graph with similar local structure.

Core Concepts

nearest-neighbor graphmanifold approximationfuzzy membershipembedding optimization

Quick facts

Complexity

Runtime and memory behavior at a glance.

Best

O(n log n)

Average

O(n log n)

Worst

O(n^2)

Space

O(n k)

When to Use

  • Use when training predictive models needs nearest-neighbor graph.
  • Use when the input matches the assumptions behind dimensionality Reduction.

When Not to Use

  • Avoid when the dataset is too small or poorly labeled for the model capacity being used.
  • Avoid when a simpler algorithm gives the required result with less setup.

What It Does

  • Embeds high-dimensional data into a lower-dimensional layout that preserves local neighborhoods
  • Uses nearest-neighbor graph and manifold approximation to guide the work.
  • Produces trained model.

Use Cases

  • Training predictive models
  • Finding patterns in data
  • Building learned representations

Inputs

  • Training data
  • Model parameters
  • Loss or scoring rule

Outputs

  • Trained model
  • Predictions
  • Training diagnostics

Key Formulas (1)

Neighbor membership

weight = exp(−(distance − ρ) / σ)
weight = exp(-(distance - rho) / sigma)

Converts neighbor distance into a fuzzy graph edge weight.

Pseudocode

  1. 1.Prepare the inputs and state needed for UMAP.
  2. 2.Apply the nearest-neighbor graph step while the stopping condition has not been met.
  3. 3.Update intermediate state and discard invalid candidates.
  4. 4.Return trained model.

Canonical Example

Input
UMAP input with a small representative case
Output
Trained model
Explanation
UMAP applies nearest-neighbor graph to produce trained model.

Implementation Notes

  • Separate training, validation, and test data before tuning model choices.
  • Keep the nearest-neighbor graph step separate enough to test independently.

Common Pitfalls

  • Evaluating only on training data hides overfitting and data leakage.
  • Forgetting to check edge cases can make UMAP look correct on only ideal inputs.

Interactive Mechanism Walkthrough

Iterative Convergence & State Trajectory

Show data, model state, and the training signal that drives updates.

UMAP mechanism walkthrough step 1 of 4x₀x₁x₂x*
Step 1 of 4: Prepare the inputs and state needed for UMAP.
machine-learning-mechanism

Notes

UMAP should be used with the assumptions and tradeoffs of dimensionality Reduction in mind.

Sources (1)

What each reference supports for this entry.

UMAP

Paper

Original UMAP reference for fuzzy simplicial-set construction and low-dimensional embedding optimization.

Open source

Explore Next

Good next jumps from the relationship graph, ranked for useful discovery.

Conceptual neighborPrincipal Component Analysis

Both produce lower-dimensional representations.

Alternative tot-SNE

UMAP and t-SNE are both nonlinear embedding methods for visualization.

Tags

Machine LearningDimensionality ReductionManifold LearningNearest Neighbor