Statistics

DBSCAN Simulator

Place points on an interactive plane and watch DBSCAN discover arbitrary shapes, separate noise, and react in real time to ε and minPts.

Points: 180ε: 32minPts: 5Final result

Interactive plane

Click to add points. Right click or double click to remove the nearest one.

Click to add · right or double click to remove
Core point
Border point
Noise
Cluster 1
Cluster 2
Cluster 3

Execution mode

Final result
The full result is recalculated immediately whenever points or parameters change.

Parameters

With these values: 3 clusters, 1 noise points, and 172 core points.
Right now there are 7 border points and 1 noise points.

Live status

Detected clusters3
Core points172
Border points7
Noise points1
Current iteration5

Point generation

Use presets designed to expose DBSCAN strengths and limits, generate random clouds, or place points manually on the plane.

Manual mode:click to add points; right click or double click to remove.

K-Means vs DBSCAN

Turn on the comparison to inspect DBSCAN next to K-Means with K set to the number of clusters found by DBSCAN.

K used in K-Means3
Clusters detected by DBSCAN3
Current noise points1

Moons, rings, and elongated structures reveal very quickly when DBSCAN follows geometry while K-Means forces convex partitions.

About this tool

DBSCAN (Density-Based Spatial Clustering of Applications with Noise) defines clusters by local density rather than distance to centroids. A point xix_i is a core point if it has at least minPts\text{minPts} neighbors within radius ε\varepsilon: ∣Nε(xi)∣≥minPts|\mathcal{N}_\varepsilon(x_i)| \geq \text{minPts}, where Nε(xi)={xj:d(xi,xj)≤ε}\mathcal{N}_\varepsilon(x_i) = \{x_j : d(x_i, x_j) \leq \varepsilon\}. Border points are within the radius of a core point but are not core points themselves. Noise points do not belong to any cluster.

This classification enables detecting clusters of arbitrary shape and, crucially, naturally identifying and discarding outliers — something K-Means cannot do. DBSCAN does not require specifying the number of clusters in advance, but does require parameters ε\varepsilon and minPts\text{minPts}, whose appropriate choice is critical. A common heuristic for ε\varepsilon is the elbow in the plot of distances to the kk-th nearest neighbor.

This tool lets you explore DBSCAN by adjusting ε\varepsilon and minPts\text{minPts} interactively. Observe how small changes in these parameters can merge or split clusters and how the algorithm handles outliers. Compare results with K-Means on non-convex distributions to understand when each algorithm is more appropriate.