DBSCAN (Density-Based Spatial Clustering of Applications with Noise) groups points by local density rather than distance to a centroid. It does not need to be told how many clusters to find, it can trace clusters of any shape — moons, spirals, rings — that centroid-based methods like k-means would slice apart, and it automatically flags sparse points as noise instead of forcing them into a cluster.
min_samples other points (including itself) inside radius ε.For each point, take its distance to its k-th nearest neighbor (k = min_samples), then sort every point's value ascending. The little chart in the panel is exactly that curve. It stays low and flat where points are packed together, then bends sharply upward once points get farther apart — dragging the eps slider moves the red reference line, and a good ε often sits right at that "elbow."
DBSCAN was introduced by Ester, Kriegel, Sander and Xu in 1996 and won the SIGKDD Test of Time Award in 2014 — it remains one of the most-cited clustering algorithms precisely because it needs no fixed cluster count and handles outliers natively, which is invaluable for messy real-world data like customer-segmentation datasets.
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.
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.
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.
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 ε.