From 236dfb505d59928a5fe13f7cb01fe04edbbd8c24 Mon Sep 17 00:00:00 2001 From: Max Zwiessele Date: Wed, 29 Oct 2014 08:21:03 +0000 Subject: [PATCH] [Laplace] sum now around argument, instead of call to array --- GPy/inference/latent_function_inference/laplace.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GPy/inference/latent_function_inference/laplace.py b/GPy/inference/latent_function_inference/laplace.py index 3b0ead7f..01d2f997 100644 --- a/GPy/inference/latent_function_inference/laplace.py +++ b/GPy/inference/latent_function_inference/laplace.py @@ -152,7 +152,7 @@ class Laplace(LatentFunctionInference): Ki_W_i = K - C.T.dot(C) #compute the log marginal - log_marginal = -0.5*np.dot(Ki_f.flatten(), f_hat.flatten()) + likelihood.logpdf(f_hat, Y, Y_metadata=Y_metadata).sum() - np.sum(np.log(np.diag(L))) + log_marginal = -0.5*np.dot(Ki_f.flatten(), f_hat.flatten()) + np.sum(likelihood.logpdf(f_hat, Y, Y_metadata=Y_metadata)) - np.sum(np.log(np.diag(L))) # Compute matrices for derivatives dW_df = -likelihood.d3logpdf_df3(f_hat, Y, Y_metadata=Y_metadata) # -d3lik_d3fhat