def test_g1k_multiple_dim(self):
     N = 10
     X = np.random.randn(N,1)
     me = GaussianQuadraticTest(self.grad_log_normal)
     K = me.k_multiple_dim(X)
     g1k_alt = me.g1k_multiple_dim(X,K,0)
     g1k_orig = me.g1k_multiple(X[:,0])
     np.testing.assert_almost_equal(g1k_alt, g1k_orig)
 def test_g1k_multiple_dim(self):
     N = 10
     X = np.random.randn(N, 1)
     me = GaussianQuadraticTest(self.grad_log_normal)
     K = me.k_multiple_dim(X)
     g1k_alt = me.g1k_multiple_dim(X, K, 0)
     g1k_orig = me.g1k_multiple(X[:, 0])
     np.testing.assert_almost_equal(g1k_alt, g1k_orig)
 def test_g1k_multiple_equals_g1k(self):
     N = 10
     X = np.random.randn(N)
     me = GaussianQuadraticTest(self.grad_log_normal)
     G1K = me.g1k_multiple(X)
      
     for i in range(N):
         for j in range(N):
             g1k = me.g1k(X[i], X[j])
             assert_almost_equal(G1K[i, j], g1k)
    def test_g1k_multiple_equals_g1k(self):
        N = 10
        X = np.random.randn(N)
        me = GaussianQuadraticTest(self.grad_log_normal)
        G1K = me.g1k_multiple(X)

        for i in range(N):
            for j in range(N):
                g1k = me.g1k(X[i], X[j])
                assert_almost_equal(G1K[i, j], g1k)