Skip to content

Commit

Permalink
ignore self neighbors from the start
Browse files Browse the repository at this point in the history
  • Loading branch information
JelmerBot committed Dec 24, 2024
1 parent fc49ae9 commit ca7b56c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fast_hdbscan/boruvka.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,4 +306,4 @@ def parallel_boruvka(tree, min_samples=10, sample_weights=None):

edges = np.vstack(edges)
edges[:, 2] = np.sqrt(edges.T[2])
return edges, neighbors, np.sqrt(core_distances)
return edges, neighbors[:, 1:], np.sqrt(core_distances)
2 changes: 1 addition & 1 deletion fast_hdbscan/core_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def knn_mst_union(neighbors, core_distances, min_spanning_tree, lens_values):
children = graph[point]
parent_lens = lens_values[point]
parent_dist = core_distances[point]
for child in neighbors[point, 1:]:
for child in neighbors[point]:
if child < 0:
continue
children[child] = (
Expand Down

0 comments on commit ca7b56c

Please sign in to comment.