We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8f1b140 commit 0219b1aCopy full SHA for 0219b1a
tests/test_rapids.py
@@ -0,0 +1,21 @@
1
+import unittest
2
+
3
+import cudf
4
+from cuml.cluster import DBSCAN
5
6
+from common import gpu_test
7
8
9
+class TestRapids(unittest.TestCase):
10
+ def test_dbscan(self):
11
+ # Create and populate a GPU DataFrame
12
+ gdf_float = cudf.DataFrame()
13
+ gdf_float['0'] = [1.0, 2.0, 5.0]
14
+ gdf_float['1'] = [4.0, 2.0, 1.0]
15
+ gdf_float['2'] = [4.0, 2.0, 1.0]
16
17
+ # Setup and fit clusters
18
+ dbscan_float = DBSCAN(eps=1.0, min_samples=1)
19
+ dbscan_float.fit(gdf_float)
20
21
+ self.assertEqual(3, dbscan_float.labels_.size)
0 commit comments