(self)
| 7 | @gpu_test |
| 8 | def test_pca_fit_transform(self): |
| 9 | import unittest |
| 10 | import numpy as np |
| 11 | from cuml.decomposition import PCA |
| 12 | |
| 13 | x = np.array([[1.0, 2.0], [2.0, 4.0], [3.0, 6.0], [-1.0, -2.0], [-2.0, -4.0]]) |
| 14 | pca = PCA(n_components=1) |
| 15 | |
| 16 | x_transformed = pca.fit_transform(x) |
| 17 | |
| 18 | self.assertEqual(x_transformed.shape, (5, 1)) |
nothing calls this directly
no outgoing calls
no test coverage detected