\[ \newcommand{\ud}{\text{d}} \newcommand{\as}{\text{a.s.}} \newcommand{\Bern}{\text{Bern}} \newcommand{\Norm}{\text{N}} \newcommand{\Poi}{\text{Poi}} \newcommand{\PP}{\text{PP}} \newcommand{\1}{\mathbb{1}} \newcommand{\E}{\mathbb{E}} \newcommand{\P}{\mathbb{P}} \DeclareMathOperator{\Var}{Var} \newcommand{\R}{\mathbb{R}} \]


Implementation of the Bouncy Particle Sampler (BPS) algorithm (focussing on the priority queue-based local BPS algorithm).

Please include the following citation:

    Author = {Bouchard-C\^{o}t\'{e}, A. and Vollmer, S.J. and Doucet, A.},
    Title = {The Bouncy particle sampler: a non-reversible rejection-free {M}arkov chain {M}onte {C}arlo method},
    Note = {Technical report arxiv:1510.02451},
    Year = {2015}



There are several options available to install the package:

Integrate to a gradle script

Simply add the following lines (replacing 1.0.0 by the current version (see git tags)):

repositories {
 maven {
    url "http://www.stat.ubc.ca/~bouchard/maven/"

dependencies {
  compile group: 'ca.ubc.stat', name: 'rejfree', version: '1.0.0'

Compile using the provided gradle script

Use in eclipse


We document here two usage scenarios: reproducing results from our paper, and creation of new models.

Reproducing results

Complete reproducibility information is stored in separate git repos (containing precise git commits, plotting scripts, etc), but for most purpose the following information should be sufficient (those not listed here are implemented in Julia, and documented elsewhere; replace @@{x,y,z} by the cross product of all argument assignments or use westrun:

-useLocal @@{true,false} \
-offDiag @@{0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9} \
-nPairs 1000 \
-timeMilli 60000 \
-collectRate 0 \
-refreshRate @@{0.01,0.1,1,10} \
-restrictVelocityNorm @@{true,false}
-useLocal true \
-nPairs @@{100,1000} \
-timeMilli 30000 \
-collectRate 0 \
-refreshRate @@{0.01,0.1,1,10} \
++plans/singleRunOnRNOptions/options-@@{1,2,3,4}.map \
-stanHome /home/bouchard/bin/cmdstan-2.7.0 \
-restrictVelocityNorm @@{true,false} \
-usePartialRefreshment false
-recordPartialSums true \
-stanHome /Users/bouchard/Documents/workspace-cpp/cmdstan-2.7.0 \
-nPairs @@{10,100,1000} \
-nRepeats 40 \
-variableMonitorInterval 100
-stanHome /home/bouchard/bin/cmdstan-2.7.0 \
-nStanIters @@{2^[4--12]} \
-randomForBothAlgorithms @@{1--10} \
-collectRate 0.0 \
-useLocalRefreshment true \
-restrictVelocityNorm false

Creating a new model

Note: we are in the process of making this more user-friendly and better documented.

ModelSpec modelSpec = mrf.newModelSpecFromGenerativeProcess(new Random(generateRandom));
LocalRFRunner rfRunner = new LocalRFRunner(localRFRunnerOption);