Code to implement experiments from Divide-and-Conquer Monte Carlo Fusion by Ryan S.Y. Chan, Adam M. Johansen, Murray Pollock and Gareth O. Roberts.
Simply run: devtools::install_github('rchan26/DCFusion')
There are a number of other R packages that I have created which this package depends on:
- layeredBB: the Fusion methodology relies on the ability to simulate layered Brownian bridge sample paths. This package contains functions to implement the algorithms to do this.
- HMCBLR: for the logistic regression, we need to be able to simulate from the posterior distribution of a logistic regression model with Gaussian priors. This package uses Stan to implement a sampler for the logistic regression posterior.
- HMCBRR: for the robust regression examples, we need to be able to simulate from the posterior distribution of a robust regression model (regression with student-t distributed priors). This package uses Stan to implement a sampler for the robust regression posterior.
- HMCGLMR: for the NB regression examples, we need to be able to simulate from the posterior distribution of a NB regression model (NB regression with Gaussian priors). This package uses Stan to implement a sampler for the NB regression posterior. Note that this package also has functions to sample from a Poisson regression posterior.
To install these dependencies, run:
devtools::install_github('rchan26/layeredBB', build_vignettes = TRUE)
devtools::install_github('rchan26/HMCBLR', build_vignettes = TRUE)
devtools::install_github('rchan26/HMCBRR', build_vignettes = TRUE)
devtools::install_github('rchan26/HMCGLMR', build_vignettes = TRUE)
The experiments were ran on Microsoft Azure using Data Science Virtual Machine's (DSVM) with either 16 core (Section 4) or 64 core machines (Section 5). The code utilises parallel computing (via the base parallel package) and by default uses all the cores available on the machine. To change this, modify the n_cores variable in the functions which perform the methodology (this is set to parallel::detectCores() by default).
- Section 4.1: varying_rho_replicates.R
- Section 4.2: varying_C_experiments_uniG_smc_replicates.R
- Section 4:3: separate_modes_smc.R and separate_modes_with_tempering.R
- Section 5.1: logistic_regression/simulated_data/
- Section 5.2: logistic_regression/credit_card/
- Divide-and-Conquer Monte Carlo Fusion
- Monte Carlo Fusion
- Bayesian Fusion: Scalable unification of distributed statistical analyses
The package is still in development and I'm currently in the process of implementing the Bayesian Fusion algorithm along with a new Generalised Bayesian Fusion algorithm.
This work is licensed under a Creative Commons Attribution 4.0 International License.
