This repository contains the scripts used to reproduce the analyses in "BayesBlend: Easy Model Blending using Pseudo-Bayesian Model Averaging, Stacking and Hierarchical Stacking in Python" by Haines & Goold (2024).
All analyses were run with Python 3.11
. Once Python 3.11
is installed locally, we recommend the
following steps:
- navigate to your local
stacking-paper-2024/
directory - initialize a virtual environment:
python3.11 venv env
- activate the environment:
source env/bin/activate
- install requirements:
pip install -r requirements/requirements.txt
Analyses can then be reproduced by running the following scripts in order:
- download and pre-process the data:
python -m data-prep
- fit the loss development models and produce figures:
python -m development
- fit the loss forecasting models and produce figures:
python -m forecast
Once analyses are reproduced, figures are located in the stacking-paper-2024/figures/
directory.