BayesBlend: Easy Model Blending using Pseudo-Bayesian Model Averaging, Stacking and Hierarchical Stacking in Python

Nathaniel Haines, Conor Goold
4/30/2024
stat.MEcs.LGstat.ML

No official code found. Best implementation: LedgerInvesting/bayesblend (36 stars, MIT, last commit 2025-12-19).

Abstract

Averaging predictions from multiple competing inferential models frequently outperforms predictions from any single model, providing that models are optimally weighted to maximize predictive performance. This is particularly the case in so-called $\mathcal{M}$-open settings where the true model is not in the set of candidate models, and may be neither mathematically reifiable nor known precisely. This practice of model averaging has a rich history in statistics and machine learning, and there are currently a number of methods to estimate the weights for constructing model-averaged predictive distributions. Nonetheless, there are few existing software packages that can estimate model weights from the full variety of methods available, and none that blend model predictions into a coherent predictive distribution according to the estimated weights. In this paper, we introduce the BayesBlend Python package, which provides a user-friendly programming interface to estimate weights and blend multiple (Bayesian) models' predictive distributions. BayesBlend implements pseudo-Bayesian model averaging, stacking and, uniquely, hierarchical Bayesian stacking to estimate model weights. We demonstrate the usage of BayesBlend with examples of insurance loss modeling.

View on arXivView PDF

Code Implementations(1)

MIT

Easily combine predictions from multiple Bayesian models using techniques including (pseudo) Bayesian model averaging, hierarchical stacking, and more!

361Stan, PythonMar 27, 202410 months agoMIT

Similar Papers

Cite this paper

@article{haines2024bayesblend,
  title  = {BayesBlend: Easy Model Blending using Pseudo-Bayesian Model Averaging, Stacking and Hierarchical Stacking in Python},
  author = {Nathaniel Haines and Conor Goold},
  year   = {2024},
  eprint = {2405.00158},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2405.00158v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2405.00158.svg)](https://codeofpaper.com/paper/2405.00158)

Discussion