From 0410676dd34ae69c18c3b988b945d255c63332d7 Mon Sep 17 00:00:00 2001 From: Angel Inkov Date: Thu, 5 Nov 2020 13:50:20 +0200 Subject: [PATCH] _find_neighbor_and_lambda off-by-one error --- hdbscan/prediction.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hdbscan/prediction.py b/hdbscan/prediction.py index 875c1dc7..efca45c5 100644 --- a/hdbscan/prediction.py +++ b/hdbscan/prediction.py @@ -174,7 +174,7 @@ def _find_neighbor_and_lambda(neighbor_indices, neighbor_distances, The lambda value at which this point joins/merges with `neighbor`. """ neighbor_core_distances = core_distances[neighbor_indices] - point_core_distances = neighbor_distances[min_samples] * np.ones( + point_core_distances = neighbor_distances[min_samples - 1] * np.ones( neighbor_indices.shape[0]) mr_distances = np.vstack(( neighbor_core_distances,