DBSCAN Clustering calculator
Perform DBSCAN spatial clustering online. Group coordinates or multidimensional data by density and filter out noise points.
What it does
You don't know how many groups to expect, or you suspect some points won't belong to any group at all — DBSCAN finds its own cluster count from where points are dense and explicitly labels sparse points as noise instead of forcing every point into a cluster.
When to use it
Each point is labelled with a cluster id or marked as noise (not assigned to any cluster); unlike k-means, the number of clusters is an output of the algorithm, not an input you chose.
Worked example
Same customer data, but you suspect there are two or three real clusters plus a scattering of people who belong to none. DBSCAN finds groups by density rather than by a fixed count, so it decides how many there are and labels the stragglers as noise instead of forcing everyone into a box.
Cautions
- DBSCAN struggles when clusters have very different densities — a single Epsilon/MinPoints setting that fits a dense cluster will swallow a sparser one into noise, or vice versa — so a high noise count can mean 'no structure' or simply 'wrong settings for this data's density'; as with any clustering, the groups still need validating against variables not used to build them.
- Because DBSCAN's result is driven entirely by two settings — Epsilon (the neighbourhood radius) and MinPoints (how many neighbours count as dense) — the noise rate and cluster count are checked against those settings; a very high noise share or a single giant cluster signals Epsilon/MinPoints need adjusting, not that the data lack structure.
Alternatives
- k-means — k-means needs you to specify the number of clusters up front and forces every point into one — if you don't have a target count in mind, or you expect outliers that don't belong anywhere, that mismatch will distort the result.
- GMM — GMM also requires a chosen k and assumes each cluster is a roughly elliptical (Gaussian) blob; DBSCAN makes neither assumption and can find arbitrarily shaped, irregular clusters.
How to read the output
- Epsilon (radius) and Min Points
- A point is a cluster core when at least Min Points lie within Epsilon of it. These two numbers ARE the model — there is nothing else to tune, and the result changes completely across a small range of them. Epsilon is in the units of the (optionally scaled) data. Sweep it rather than accepting the first number that produces a plausible-looking picture: if the clusters are only there for one value of Epsilon, they are a property of Epsilon.
- The noise label
- Points in no dense region are labelled noise. This is the feature that separates DBSCAN from k-means, not a failure. Almost everything labelled noise means Epsilon is too small or Min Points too large; a single cluster containing everything means the reverse. Both are settings, not findings.
- Silhouette
- Per point, how much closer it sits to its own cluster than to the nearest other one, averaged over the data. Roughly: above 0.5 is a clean separation, 0.25–0.5 is weak structure, below 0.25 is not a partition worth describing. It measures whether the CUT is clean, not whether the groups mean anything. A high silhouette on variables that are three versions of the same measurement describes your column list, not your subjects.
- Whether the data were scaled
- Every method here works on distances, and a distance adds up your columns' units. Standardizing puts each variable on the same footing before that sum is taken. Unscaled, the variable with the largest numeric range silently becomes the clustering. Income in pounds against age in years is a clustering of income. Turn scaling off only when the raw units are genuinely comparable and you mean to keep their relative weight.
- Varying density
- One radius is applied everywhere. When one real cluster is dense and another sparse, no single Epsilon works: it either merges the dense pair or dissolves the sparse one into noise. That failure looks like a result rather than an error.
- The clusters it found
- DBSCAN is the one method here that can decline — with a small enough Epsilon it returns no clusters at all. Clustering always returns clusters, whether or not any exist — k-means will happily cut uniform noise into four tidy pieces. A partition is a hypothesis, not a finding: check the groups differ on a variable you did NOT cluster on before describing them as real. Widen Epsilon far enough and DBSCAN, too, always returns clusters; declining to partition is a property of the settings, not a verdict on the data.
How this calculator is validated · Which statistical test should I use?