Example of Blang within a Nextflow pipeline (studying the effect of increasing the number of parallel tempered chains)
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
deliverables/compare-PT-MCMC
templates
.gitignore
README.md
compare-PT-MCMC.nf
nextflow

README.md

Summary

An example of how to run Blang as part of Nextflow execution pipeline.

Usage

Requires Java 8, UNIX, and git.

git clone https://github.com/UBC-Stat-ML/blang-mixture-tempering.git
cd blang-mixture-tempering
./nextflow run compare-PT-MCMC.nf -resume

More info

This demonstrates at the same time how useful parallel tempering is in practice using an example from the PPL for hacker book but using Blang instead of pyMC to do the analysis.

Here is the model: Mixture.bl which is just a simple normal mixture with two components. We will run it on this synthetic data which is just 300 synthetic observations that look like that: image

With 1 chain you get the following trace plots for the two mean parameters: image You can see that the chain will not be able to discover the symmetric solution of switching the two labels.

With 8 chains now: image So we see that we do switch.

See the workflow file, which builds the Blang code, download dependencies, get the data, then runs Blang with various command line arguments, and finally creates plots in deliverables.