HDBSCAN
Hierarchical Density-Based Spatial Clustering of Applications with Noise · Also known as: HDBSCAN, Hierarchical DBSCAN, hierarchical density-based clustering, HDBSCAN*
HDBSCAN (Hierarchical Density-Based Spatial Clustering of Applications with Noise) is a density-based clustering algorithm introduced by Campello, Moulavi, and Sander in 2013. It extends DBSCAN by building a full hierarchy of density-based clusters across all density scales and then extracting a stable flat partition, making it robust to datasets where cluster densities vary substantially across regions.
Read the full method
Sign in with a free account to read this section.
Method map
The neighbourhood of related methods — select a node to explore.
+2 more
When to use it
HDBSCAN is appropriate when clusters of varying density are expected in the data, when the number of clusters is unknown, when noise and outlier identification are important, or when DBSCAN's sensitivity to the epsilon hyperparameter causes problems. It requires only the minimum cluster size parameter and optionally the neighbourhood size k. The method is assumption-free regarding cluster shape and works well on spatial coordinates, embeddings (e.g. UMAP projections), and other continuous feature spaces. A dataset of at least 15–20 points per expected cluster is advisable; the algorithm scales to tens of thousands of points efficiently and to larger datasets with approximate nearest-neighbour variants.
Strengths & limitations
- Discovers clusters of arbitrary shape and varying density without requiring a global epsilon parameter.
- Produces a soft noise label for ambiguous points, enabling outlier detection as a by-product.
- Requires only one intuitive parameter — minimum cluster size — making it substantially easier to tune than DBSCAN.
- The condensed cluster tree provides a rich, interpretable view of the hierarchical cluster structure.
- Soft cluster membership probabilities can be extracted from the stability scores, giving a probabilistic assignment alongside the hard label.
- Performance can degrade in very high-dimensional spaces where distance concentration diminishes the meaning of nearest-neighbour distances (the curse of dimensionality); dimensionality reduction before clustering is recommended.
- The minimum cluster size parameter influences results significantly; too small a value produces many tiny clusters and too large a value merges distinct groups.
- Computational cost scales approximately as O(n log n) with efficient implementations, but remains slower than k-means for very large datasets.
- The algorithm is inherently non-deterministic when tie-breaking in the MST step is required, so exact reproducibility requires a fixed random seed.
Frequently asked
What is the main advantage of HDBSCAN over DBSCAN?
DBSCAN requires a single global density threshold (epsilon) that must be the same for every cluster. When clusters differ in density — a common situation in real data — no single epsilon works well simultaneously. HDBSCAN eliminates this requirement by exploring the full density hierarchy and selecting clusters based on their persistence across density scales, automatically adapting to varying local densities.
How do I choose the minimum cluster size?
The minimum cluster size controls the smallest grouping that will be considered a genuine cluster rather than noise. A value of 5 is a common starting point; it should be tuned based on domain knowledge about the smallest meaningful group in the data. Larger values produce fewer, coarser clusters and more noise points; smaller values produce finer granularity and less noise suppression.
What do the cluster membership probabilities mean?
Each point is assigned a probability between 0 and 1 reflecting how confidently it belongs to its assigned cluster. A probability of 1 means the point was deep inside a stable cluster throughout the hierarchy; a probability near 0 means it was on the fringes and only marginally assigned. Points with low probabilities are borderline cases and may warrant closer inspection.
Is HDBSCAN suitable for very large datasets?
With an efficient implementation (such as the Python hdbscan library), the algorithm runs in approximately O(n log n) time and handles hundreds of thousands of points in practice. For datasets in the millions, approximate nearest-neighbour structures (such as those based on k-d trees or ball trees) can be used to accelerate the core distance computation, though at the cost of some approximation.
Sources
- Campello, R. J. G. B., Moulavi, D., & Sander, J. (2013). Density-Based Clustering Based on Hierarchical Density Estimates. In J. Pei et al. (Eds.), Advances in Knowledge Discovery and Data Mining. PAKDD 2013. Lecture Notes in Computer Science, vol. 7819 (pp. 160–172). Springer, Berlin, Heidelberg. DOI: 10.1007/978-3-642-37456-2_14 ↗
- Campello, R. J. G. B., Moulavi, D., Zimek, A., & Sander, J. (2015). Hierarchical Density Estimates for Data Clustering, Visualization, and Outlier Detection. ACM Transactions on Knowledge Discovery from Data, 10(1), Article 5. DOI: 10.1145/2733381 ↗
- McInnes, L., Healy, J., & Astels, S. (2017). hdbscan: Hierarchical density based clustering. Journal of Open Source Software, 2(11), 205. DOI: 10.21105/joss.00205 ↗
How to cite this page
ScholarGate. (2026, June 3). Hierarchical Density-Based Spatial Clustering of Applications with Noise. ScholarGate. https://scholargate.app/en/machine-learning/hdbscan
Which method?
Set this method beside its closest kin and read them side by side — the library lays the books on the table; the choice is yours.
- DBSCANMachine learning↔ compare
- OPTICSMachine learning↔ compare
- Spectral ClusteringMachine learning↔ compare