From 12e895f8a7e2b8103b9ad8276bcbdfcb8d2f74cd Mon Sep 17 00:00:00 2001 From: Nicolo Fusi Date: Tue, 19 Feb 2013 14:40:28 +0000 Subject: [PATCH] added contribution from the prior to marginal LL printed in the model __str__ --- GPy/core/model.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/GPy/core/model.py b/GPy/core/model.py index a0628c42..5160273b 100644 --- a/GPy/core/model.py +++ b/GPy/core/model.py @@ -294,7 +294,8 @@ class model(parameterised): strs = [str(p) if p is not None else '' for p in self.priors] width = np.array(max([len(p) for p in strs] + [5])) + 4 - s[0] = 'Marginal log-likelihood: {0:.3e}\n'.format(self.log_likelihood()) + s[0] + MLL = self.log_likelihood() + self.log_prior() + s[0] = 'Marginal log-likelihood: {0:.3e}\n'.format(MLL) + s[0] s[0] += "|{h:^{col}}".format(h = 'Prior', col = width) s[1] += '-'*(width + 1)