MCPcopy Create free account
hub / github.com/Kaggle/docker-python / test_pca_fit_transform

Method test_pca_fit_transform

tests/test_cuml.py:9–19  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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))

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected