← Lab
coreoff
confirmedupstream bugPython · hdbscanSystems & data structuresJuly 25, 2026
the question
Does hdbscan's PredictionData cache core distances with the same neighbour index as the fit path?
what came out
hdbscan's PredictionData caches core distances with tree.query(k=min_samples), the (min_samples-1)th neighbour, while every fit path and the new-point core use the min_samples-th. Correcting only that query flips 2/800 predicted labels and shifts membership probabilities by 0.77. Fix: k=min_samples+1 at prediction.py:171.
method & receipts
- Result: confirmed
- Reproducible — one script re-runs the whole thing from scratch.
- Tested — a correctness/benchmark suite ships alongside the code.
→ read the code and re-run it
github.com/v-code01/coreoff