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
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | |