def LOO(self, kern, X, Y, likelihood, posterior, Y_metadata=None, K=None):
g = posterior.woodbury_vector<EOL>c = posterior.woodbury_inv<EOL>c_diag = np.diag(c)[:, None]<EOL>neg_log_marginal_LOO = <NUM_LIT:0.5>*np.log(<NUM_LIT:2>*np.pi) - <NUM_LIT:0.5>*np.log(c_diag) + <NUM_LIT:0.5>*(g**<NUM_LIT:2>)/c_diag<EOL>return -neg_log_marginal_LOO<EOL>
Leave one out error as found in
"Bayesian leave-one-out cross-validation approximations for Gaussian latent variable models"
Vehtari et al. 2014.