HomeAI & Machine LearningDBSCAN: Finding Clusters of Any Shape by Density, Not Distance

🟣 DBSCAN: Finding Clusters of Any Shape by Density, Not Distance

How DBSCAN groups points by local density instead of distance to a centroid, why it can find arbitrarily shaped clusters and flag outliers automatically, and how to pick its two parameters, eps and min_samples, using a k-distance plot.

AI & Machine Learning3DAdvanced60 FPS
dbscan-density-based-clustering-explained-lab ↗ Open standalone

A live DBSCAN run over a 3D scatter of points: color shows the cluster each point was assigned to, point size marks whether it's a core, border, or noise point, and you can watch the eps-neighborhood test happen on individual points in real time.

🔬 What It Demonstrates

DBSCAN chains together "core" points — those with at least min_samples neighbors within radius ε — into clusters, absorbs nearby border points, and leaves everything else labeled as noise. Because it follows density rather than distance to a single center, it traces moons, spirals, and other non-convex shapes intact.

🎮 How to Use

Pick a dataset shape, then drag ε and min_samples and watch clusters merge, split, or dissolve into noise instantly. Toggle the density-reachability graph to see the ε-edges that connect core points into clusters, and the ε-neighborhood demo to watch individual core and noise points get tested live.

💡 Did You Know?

The little k-distance curve in the panel is the same diagnostic data scientists use in practice: sort every point's distance to its k-th nearest neighbor, and the "elbow" in that curve is a strong starting guess for ε.

⚙ Under the hood

How DBSCAN groups points by local density instead of distance to a centroid, why it can find arbitrarily shaped clusters and flag outliers automatically, and how to pick its two parameters, eps and min_samples, using a k-distance plot.

clusteringdensitymachine learningdata analysisalgorithmsk-distanceThree.js

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

What did you find?

Add reproduction steps (optional)