Skip to content

Commit

Permalink
test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dimtsap committed Apr 9, 2022
1 parent 4ea745a commit 67f420d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/unit_tests/dimension_reduction/test_kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def test_kernel_gaussian_1d():
gaussian.calculate_kernel_matrix(points)

assert np.allclose(np.matrix.round(gaussian.kernel_matrix, 4),
np.array([[1., 7.14845072e-07, 1.], [7.14845072e-07, 1., 7.14845072e-07], [1, 7.14845072e-07, 1]]),
np.array([[1., 0.26447726, 1.], [0.26447726, 1., 0.26447726], [1, 0.26447726, 1]]),
atol=1e-04)
assert np.round(gaussian.epsilon, 4) == 2

Expand All @@ -58,9 +58,9 @@ def test_kernel_gaussian_2d():
gaussian = GaussianKernel()
gaussian.calculate_kernel_matrix(points)

assert np.allclose(np.matrix.round(gaussian.kernel_matrix, 4), np.array([[1., 0.628, 0.3912],
[0.628, 1., 0.2534],
[0.3912, 0.2534, 1.]]))
assert np.allclose(np.matrix.round(gaussian.kernel_matrix, 4), np.array([[1., 0.39434829, 0.15306655],
[0.39434829, 1., 0.06422136],
[0.15306655, 0.06422136, 1.]]), atol=1e-4)
assert np.round(gaussian.epsilon, 4) == 1.0


Expand Down

0 comments on commit 67f420d

Please sign in to comment.