bamojax.marginal_likelihoods.utility
¶
iid_likelihood(L)
¶
We typically have multiple observations and assume the likelihood factorizes as:
\[
\log p\left(Y \mid \theta\right) = \sum_{i=1}^N \log p\left(y_i \mid \theta\right) \enspace.
\]
Source code in bamojax/marginal_likelihoods/utility.py
6 7 8 9 10 11 12 13 14 15 16 17 |
|
flatten_dict_to_array(samples)
¶
Bamojax states are dictionaries, with entries per model variable. Here we flatten them so the proposal distribution can be one single multivariate distribution.
Source code in bamojax/marginal_likelihoods/utility.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
|