File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -104,6 +104,12 @@ def test_hdbscan_no_clusters():
104
104
n_clusters_2 = len (set (labels )) - int (- 1 in labels )
105
105
assert n_clusters_2 == 0
106
106
107
+ def test_hdbscan_sample_weight ():
108
+ sample_weight = y .astype (np .float32 )
109
+ labels , p = fast_hdbscan (X , sample_weights = sample_weight )
110
+ n_clusters_1 = len (set (labels )) - int (- 1 in labels )
111
+ assert n_clusters_1 == n_clusters - 1
112
+
107
113
108
114
def test_hdbscan_min_cluster_size ():
109
115
for min_cluster_size in range (2 , len (X ) + 1 , 1 ):
@@ -142,7 +148,7 @@ def test_hdbscan_badargs():
142
148
def test_fhdbscan_allow_single_cluster_with_epsilon ():
143
149
np .random .seed (0 )
144
150
no_structure = np .random .rand (150 , 2 )
145
- # without epsilon we should see 65 noise points and 9 labels
151
+ # without epsilon we should see 68 noise points and 9 labels
146
152
c = HDBSCAN (
147
153
min_cluster_size = 5 ,
148
154
cluster_selection_epsilon = 0.0 ,
You can’t perform that action at this time.
0 commit comments