Skip to content

Commit

Permalink
Add smoke test for sklearnex (Kaggle#1143)
Browse files Browse the repository at this point in the history
sklearnex was added in Kaggle#1135

http://227237481
  • Loading branch information
rosbo authored Mar 29, 2022
1 parent f4d7262 commit 98ca09f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/test_sklearnex.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import unittest

import numpy as np

class TestSklearnex(unittest.TestCase):
def test_dbscan(self):
from sklearnex.cluster import DBSCAN
X = np.array([[1., 2.], [2., 2.], [2., 3.],
[8., 7.], [8., 8.], [25., 80.]], dtype=np.float32)

clustering = DBSCAN(eps=3, min_samples=2).fit(X)
np.testing.assert_array_equal(np.array([0, 0, 0, 1, 1, -1]), clustering.labels_)

0 comments on commit 98ca09f

Please sign in to comment.