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

Swapping plus and minus here and there. Fixes #19 #29

Closed TTitscher closed 3 years ago

TTitscher commented 3 years ago

When we ignore all that k(theta) = (model(theta) - data) vs k(theta) = (data - model(theta)) stuff, the Chapell paper basically defines the Jacobian J as J = - dk / dtheta, which can be confusing. Also it was documented incorrectly in our code.

This PR changes this definition to J = dk / dtheta.

ajafarihub commented 3 years ago

As far as I see the changes in "vb.py", I think everything should be correct. And I believe, all the tests are also already adjusted accordingly. After merging the commit, I'll also test it with my own GDM problem.