Skip to content

Commit 4c0dd64

Browse files
committed
hdbscan is awfully slow on CPU side. I added hdbscan-gpu option to use hdbscan from NVidea cuml.
Consult RAPIDS page for installation instructions https://docs.rapids.ai/install
1 parent 73c8f07 commit 4c0dd64

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/spikeinterface/sorters/internal/simplesorter.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,11 @@ def _run_from_folder(cls, sorter_output_folder, params, verbose):
182182

183183
out = hdbscan.hdbscan(features_flat, **clust_params)
184184
peak_labels = out[0]
185+
elif clust_method == "hdbscan-gpu":
186+
from cuml.cluster import HDBSCAN as hdbscan
187+
188+
model = hdbscan(**clust_params).fit(features_flat)
189+
peak_labels = model.labels_.copy()
185190
elif clust_method in ("kmeans"):
186191
from sklearn.cluster import MiniBatchKMeans
187192

0 commit comments

Comments
 (0)