DBSCAN density-based clustering

Description

Cluster points by local density, finding clusters of any shape and number while labelling sparse points as noise, with parameters set from a k-distance plot.

Density at a point is the number of points within radius Eps. Points with at least MinPts neighbours are core points; points within Eps of a core point are border points; the rest are noise. Core points within Eps of each other are linked into clusters, border points join a neighbouring core cluster, and noise is discarded. The algorithm therefore finds the number of clusters itself and produces a partial clustering, which suits behavioural data with many unrepresentative users. Parameters come from a sorted plot of each point's distance to its k-th nearest neighbour: Eps is set at the knee and MinPts equals k (k = 4 in the original two-dimensional work). DBSCAN fails when cluster densities differ widely, struggles in high dimensions, and is sensitive to k: small k turns noise clumps into clusters, large k swallows small clusters.

Attributes

Loss type
Siloed
Effort
Days

Steps

  1. Prepare and scale features, reducing dimensionality first if there are many (for example with PCA or UMAP).
  2. Choose k; compute each point's distance to its k-th nearest neighbour.
  3. Sort and plot these distances; set Eps at the knee and MinPts equal to k.
  4. Label points core, border or noise and remove noise points.
  5. Connect core points within Eps into clusters and assign border points to an associated core cluster.
  6. Inspect cluster sizes and noise share, then profile clusters and check robustness to nearby Eps values.

Sources

  • Cluster Analysis: Basic Concepts and Algorithms (Tan et al., 2006)
  • AI-for-quantitative-UX-research (Rafiei & Jozranjbar, GitHub repository, 2026)
  • 7 Clustering Methods for UX Researchers (carousel, n.d.)
  • 8 Clustering Algorithms in Machine Learning that All Data Scientists Should Know (McGregor, 2020)

Also known as

  • DBSCAN
  • Density-based clustering
  • DBSCAN with k-distance parameter selection
  • k-dist plot

Categories

  • Analytics & Behaviour
  • Computational & Machine Learning