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