Conditions | 4 |
Total Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 4 |
Changes | 0 |
1 | 1 | import numpy as np |
|
13 | 1 | def test_subspace_alignment(): |
|
14 | """Test the alignment between datasets.""" |
||
15 | 1 | X = rnd.randn(100, 10) |
|
16 | 1 | Z = np.dot(rnd.randn(100, 10), np.diag(np.arange(1, 11))) |
|
17 | 1 | clf = SubspaceAlignedClassifier() |
|
18 | 1 | V, CX, CZ = clf.subspace_alignment(X, Z, num_components=3) |
|
19 | 1 | assert not np.any(np.isnan(V)) |
|
20 | 1 | assert CX.shape[1] == 3 |
|
21 | 1 | assert CZ.shape[1] == 3 |
|
22 | |||
44 |