HomeData ScienceCurse of Dimensionality: Distance Histogram & Volume Curve

Curse of Dimensionality: Distance Histogram & Volume Curve

2D demo of the curse of dimensionality: a live pairwise-distance histogram and an analytic ball/cube volume-ratio curve computed directly from the full d-dimensional statistics, no 3D projection involved.

Data Science2DModerate60 FPS📱 Mobile-adapted⇄ 3D version
2d-ds-topic-38 ↗ Open standalone

Every distance-based technique in data science — k-nearest neighbors, clustering, PCA-style variance capture — quietly assumes that "near" and "far" mean something. This 2D simulator generates a real N-point cloud with d independent coordinates and shows its actual full-dimensional statistics two ways: a live histogram of sampled pairwise distances, and a pair of curves plotted against dimension itself — the exact ball/cube volume ratio (from the Gamma function) and a Monte-Carlo sweep of the relative contrast across every dimension from 2 to 150. Drag the dimension slider and watch the histogram collapse to a spike while the marker slides down both curves toward zero — no camera angle needed, because the collapse itself is the picture.

⚙ Under the hood

A 2D pairwise-distance histogram and an analytic ball/cube volume-ratio curve plotted against dimension, computed directly from the same full d-dimensional statistics as the 3D version — watch the histogram collapse to a spike and both curves fall toward zero as dimension grows.

data sciencedimensionality reductionstatisticshigh-dimensional spacemachine learning

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)