def test_quadratic_model_check(self): np.random.seed(42) X = np.random.normal(size=(100,3)) f = sr.SimulationRunner(self.quad_fun).run(X) gamma = 0.33*np.ones((3,1)) e, W = sdr.quadratic_model_check(X, f, gamma)
def test_quadratic_model_check(self): np.random.seed(42) X = np.random.normal(size=(100,3)) f = sr.SimulationRunner(self.quad_fun).run(X) gamma = 0.33*np.ones((3,1)) e, W = sdr.quadratic_model_check(X, f, gamma) if self.writeData: np.savez('data/test_sdr_0_2',e=e, W=W) data_test = helper.load_test_npz('test_sdr_0_2.npz') np.testing.assert_almost_equal(e, data_test['e']) np.testing.assert_almost_equal(W, data_test['W'])