scikit-learn-contrib / hdbscan

A high performance implementation of HDBSCAN clustering.
http://hdbscan.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
2.82k stars 507 forks source link

Is there a bug for "label up to the root" ? #603

Open onemonomo opened 1 year ago

onemonomo commented 1 year ago

https://github.com/scikit-learn-contrib/hdbscan/blob/813636b2eda63739c9fc081f2ef78ad4c98444a1/hdbscan/_hdbscan_linkage.pyx#L208

This line want to connect all son nodes directly to the top node. But p, parent[p] = parent[p], n equals to p = parent[p] parent[p] = n

It only run once. Like this: image