def test_gk_multiple_dim(self):
     N = 10
     X = np.random.randn(N, 1)
     me = GaussianQuadraticTest(self.grad_log_normal)
     K = me.k_multiple_dim(X)
     gk_alt = me.gk_multiple_dim(X, K, 0)
     gk_orig = me.gk_multiple(X[:, 0])
     np.testing.assert_almost_equal(gk_alt, gk_orig)
 def test_gk_multiple_dim(self):
     N  = 10
     X  = np.random.randn(N,1)
     me = GaussianQuadraticTest(self.grad_log_normal)
     K  = me.k_multiple_dim(X)
     gk_alt  = me.gk_multiple_dim(X,K,0)
     gk_orig = me.gk_multiple(X[:,0])
     np.testing.assert_almost_equal(gk_alt, gk_orig)
 def test_gk_multiple_equals_gk(self):
     N = 10
     X = np.random.randn(N)
     me = GaussianQuadraticTest(self.grad_log_normal)
     GK = me.gk_multiple(X)
      
     for i in range(N):
         for j in range(N):
             gk = me.gk(X[i], X[j])
             assert_almost_equal(GK[i, j], gk)
    def test_gk_multiple_equals_gk(self):
        N = 10
        X = np.random.randn(N)
        me = GaussianQuadraticTest(self.grad_log_normal)
        GK = me.gk_multiple(X)

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