HomeData ScienceUMAP Layout Optimizer: Attractive & Repulsive Forces

UMAP Layout Optimizer: Attractive & Repulsive Forces

Watch UMAP's force-directed embedding optimizer run live in 3D: k-nearest-neighbor edges pull connected points together while every pair repels, converging from random noise into separated clusters. Tune n_neighbors, min_dist and repulsion strength and watch stress and neighbor-preservation react.

Data Science3DAdvanced60 FPS
ds-topic-90 ↗ Open standalone

UMAP reduces high-dimensional data to a handful of dimensions by optimizing a low-dimensional layout so that its k-nearest-neighbor graph structure is preserved — using an attractive force along graph edges and an inverse-square repulsive force between every pair of points, exactly the two-force tug-of-war visualized here in real time. Four synthetic clusters start as random noise in 3D and are pulled and pushed into shape epoch by epoch; tune n_neighbors, min_dist, repulsion strength and optimizer speed while live readouts track layout stress and how much of the original neighbor structure survives the embedding.

⚙ Under the hood

Watch UMAP's force-directed embedding optimizer run live in 3D: k-nearest-neighbor graph edges pull connected points together while every pair repels with an inverse-square force, converging from random noise into separated clusters.

umapdimensionality-reductionforce-directed-layoutk-nearest-neighborsunsupervised-learningembedding

3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)