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

VB `state` variable #80

Open TTitscher opened 2 years ago

TTitscher commented 2 years ago

Our implementation follows the paper notation of having separate variables s, c, m, L and s0, c0, m0, L0 for the prior, and things like L_inv for efficiency. This makes it ugly (debatable, I know) to represent the rough structure of the algorithm

while keep_running(s, c, m, ...):
  update_parameters(s, c, m, ...)
  update_noise(s, c, m, ...)
  update_prior(s, c, m,...) # e.g. for ARD
  evaluate_model_and_jacobian(m)
  f = free_energy(s, c, m, ...)

because each methods needs almost all parameters. Introducing a VBState may clear that up.

Disadvantage: The structure and notation of the original paper may be harder to follow. But maybe slight improvements of the algorithm justify to write our own (small) paper, that we can refer to.

joergfunger commented 2 years ago

From my point of view, that is a good option. How would you call it, maybe just q according to the distributions in the paper eq.3?