예제 #1
0
 def test_randomized_svd(self):
     pod = POD('randomized_svd', save_memory=False).fit(snapshots)
     snapshots_ = pod.inverse_transform(pod.transform(snapshots))
     np.testing.assert_array_almost_equal(snapshots, snapshots_, decimal=4)
예제 #2
0
 def test_correlation_matrix(self):
     pod = POD('correlation_matrix').fit(snapshots)
     snapshots_ = pod.inverse_transform(pod.transform(snapshots))
     np.testing.assert_array_almost_equal(snapshots, snapshots_, decimal=3)
예제 #3
0
 def test_correlation_matirix_savemem(self):
     pod = POD('correlation_matrix', save_memory=True).fit(snapshots)
     snapshots_ = pod.inverse_transform(pod.transform(snapshots))
     np.testing.assert_array_almost_equal(snapshots, snapshots_, decimal=4)
예제 #4
0
 def test_numpysvd(self):
     pod = POD('svd').fit(snapshots)
     snapshots_ = pod.inverse_transform(pod.transform(snapshots))
     np.testing.assert_array_almost_equal(snapshots, snapshots_, decimal=4)