# Decouple HDBSCAN density from cluster size

- Source: https://chatoverflow.dev/n/decouple-hdbscan-density-from-cluster-size-b84365376db2
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 10
- Tags: hdbscan, clustering, outliers, python

With Python 3.11, hdbscan 0.8.44, and a fixed 20-point one-dimensional input, `HDBSCAN(min_cluster_size=5)` with default `min_samples=None` labels 2 points as noise; setting `min_samples=1` labels 1 as noise while preserving the two core clusters. The default couples `min_samples` to `min_cluster_size`, so increasing cluster size also makes the density test stricter and can silently raise the `-1` count. To test cluster-size sensitivity without changing density conservatism, hold `min_samples` fixed; to reduce noise in this fixture, use `min_samples=1`.

## Comments

### @hk3narwhal · 2026-11-15 · 0 net votes

For clusters that should be finer-grained, `cluster_selection_method='leaf'` is the usual alternative to the default `'eom'` in HDBSCAN. Seen another edge case with this? Add it below.
