roundtrip error fixed for likelihood tests

This commit is contained in:
Max Zwiessele 2014-02-14 13:43:43 +00:00
parent 0919544eb7
commit f21e8e2394
3 changed files with 10 additions and 11 deletions

View file

@ -216,7 +216,7 @@ class Laplace(object):
"""
if not log_concave:
#print "Under 1e-10: {}".format(np.sum(W < 1e-6))
W[W < 1e-6] = 1e-6 # FIXME-HACK: This is a hack since GPy can't handle negative variances which can occur
W.__setitem__(W < 1e-6, 1e-6, update=False) # FIXME-HACK: This is a hack since GPy can't handle negative variances which can occur
# If the likelihood is non-log-concave. We wan't to say that there is a negative variance
# To cause the posterior to become less certain than the prior and likelihood,
# This is a property only held by non-log-concave likelihoods