Skip to content

Commit 1b51006

Browse files
authored
Fix HDBSCAN nn-descent errors with default arguments (min_samples=None) (#7402)
Closes #7393 Authors: - Victor Lafargue (https://github.com/viclafargue) Approvers: - Jinsol Park (https://github.com/jinsolp) - Simon Adorf (https://github.com/csadorf) URL: #7402
1 parent 7fe371d commit 1b51006

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

python/cuml/cuml/cluster/hdbscan/hdbscan.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -996,13 +996,13 @@ class HDBSCAN(Base, InteropMixin, ClusterMixin, CMajorInputTagMixin):
996996
<float> kwds.get("nnd_termination_threshold", 0.0001)
997997
)
998998

999-
if params.build_params.nn_descent_params.graph_degree < self.min_samples+1:
999+
if params.build_params.nn_descent_params.graph_degree < min_samples+1:
10001000
logger.warn(
10011001
"to use nn descent as the build algo, nnd_graph_degree should be larger "
10021002
"than or equal to min_samples + 1. setting nnd_graph_degree to "
10031003
"min_samples + 1."
10041004
)
1005-
params.build_params.nn_descent_params.graph_degree = self.min_samples+1
1005+
params.build_params.nn_descent_params.graph_degree = min_samples+1
10061006
if (
10071007
params.build_params.nn_descent_params.intermediate_graph_degree
10081008
< params.build_params.nn_descent_params.graph_degree

0 commit comments

Comments
 (0)