@@ -142,46 +142,3 @@ def test_adasyn_error(adasyn_params, err_msg):
142142 adasyn = ADASYN (** adasyn_params )
143143 with pytest .raises (ValueError , match = err_msg ):
144144 adasyn .fit_resample (X , Y )
145-
146-
147- def test_ada_fit_resample_cuml_nn_obj ():
148- cuml = pytest .importorskip ("cuml" )
149- nn = cuml .neighbors .NearestNeighbors (n_neighbors = 2 )
150- ada = ADASYN (random_state = RND_SEED , n_neighbors = nn )
151- X_resampled , y_resampled = ada .fit_resample (X , Y )
152- X_gt = np .array (
153- [
154- [0.11622591 , - 0.0317206 ],
155- [0.77481731 , 0.60935141 ],
156- [1.25192108 , - 0.22367336 ],
157- [0.53366841 , - 0.30312976 ],
158- [1.52091956 , - 0.49283504 ],
159- [- 0.28162401 , - 2.10400981 ],
160- [0.83680821 , 1.72827342 ],
161- [0.3084254 , 0.33299982 ],
162- [0.70472253 , - 0.73309052 ],
163- [0.28893132 , - 0.38761769 ],
164- [1.15514042 , 0.0129463 ],
165- [0.88407872 , 0.35454207 ],
166- [1.31301027 , - 0.92648734 ],
167- [- 1.11515198 , - 0.93689695 ],
168- [- 0.18410027 , - 0.45194484 ],
169- [0.9281014 , 0.53085498 ],
170- [- 0.14374509 , 0.27370049 ],
171- [- 0.41635887 , - 0.38299653 ],
172- [0.08711622 , 0.93259929 ],
173- [1.70580611 , - 0.11219234 ],
174- [0.34532399 , - 0.18067361 ],
175- [1.44430593 , - 0.41617493 ],
176- [0.28204936 , - 0.13953426 ],
177- [1.08450984 , 0.03948221 ],
178- [- 0.19072677 , - 0.2341768 ],
179- ]
180- )
181-
182- y_gt = np .array (
183- [0 , 1 , 0 , 0 , 0 , 1 , 1 , 1 , 1 , 1 , 1 , 0 , 0 , 1 , 1 , 1 , 1 , 0 , 1 , 0 , 0 , 0 , 0 , 0 , 0 ]
184- )
185-
186- assert_allclose (X_resampled , X_gt , rtol = R_TOL )
187- assert_array_equal (y_resampled , y_gt )
0 commit comments