pub fn pseudo_bma_weights(
lpd: &[Vec<f64>],
bootstrap: Option<(usize, u64)>,
) -> Result<Vec<f64>>Expand description
Pseudo-BMA weights: w_k ∝ exp(elpd_k), with elpd_k = Σ_i lpd_ik.
With bootstrap = Some((draws, seed)) these are pseudo-BMA+ weights:
each of draws Bayesian-bootstrap replicates reweights the
observations by Dirichlet(1, …, 1) (replicate b from stream b of
seed), and the weights are averaged over replicates. That accounts
for the uncertainty in the elpd differences, so a model that is only
slightly better does not take all the weight.