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

Scaled vb #38

Closed TTitscher closed 3 years ago

TTitscher commented 3 years ago

In my bridge example, I have Young's modulus parameters that (because of SI units) are in the order of E~10⁹. Thus, their precision is in the order of 10⁻¹⁸. I realized that this causes numerical problems, especially if mixed with parameters with order 10⁻³ or so. The algorithm did not converge.

Thus, I often manually change my parameter to E = E_factor * 10⁹ where I now infer E_factor. IMO this step could be done automatically within VB. So I tried scaling the parameter MVN by the prior mean -- only if the prior mean is not close to zero -- and it seems to work. Then, before returning the posterior MVN, I scale it back.

Opinions on that? Should this be a default part of the algorithm? Should it be an option?

TTitscher commented 3 years ago

Alright, if you also like this option, I want to add the following (apart from Jörgs suggestions):