Open onemonomo opened 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
p, parent[p] = parent[p], n
p = parent[p]
parent[p] = n
It only run once. Like this:
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 top = parent[p]
parent[p] = n
It only run once. Like this: