Model weights for blending: stacking and pseudo-BMA
model_weights.RdWeights from pointwise held-out log predictive densities (Yao, Vehtari,
Simpson and Gelman, 2018), for any model: PSIS-LOO pointwise values
from elpd_loo() for a Bayesian fit, or cross-validated log densities
for a GLM, GAM or neural network. stacking_weights() maximizes the log
score of the mixture of the models' predictive distributions; a model
that adds nothing gets weight exactly 0. pseudo_bma_weights() is
proportional to exp(elpd); with bootstrap = TRUE (pseudo-BMA+) it is
averaged over Bayesian-bootstrap replicates, which keeps a model that is
only slightly better from taking all the weight. Blend the models'
simulations with blend_predictive().
Details
Stacking matches an SLSQP optimum polished by Newton's method to 1e-10
(validation/scripts/stacking_weights.py); loo::stacking_weights()
stops earlier and agrees to about 1e-3.