BAMresearch / bayem

Implementation and derivation of "Variational Bayesian inference for a nonlinear forward model." [Chappell et al. 2008] for arbitrary, user-defined model errors.
MIT License
2 stars 1 forks source link

Fix error in loglike #33

Closed TTitscher closed 3 years ago

TTitscher commented 3 years ago

In the current implementation I (I think) introduced a bug in the loglike_contribution that was like

+ np.sum(np.square(error / sigma ** 2))

so sigma**2 within a np.square.

I reformulated the definition to use the precision and provided a test against scipy.stats.norm.logpdf(terms).