\[ \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:
@article{bps,
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:
Simply add the following lines (replacing 1.0.0 by the current version (see git tags)):
repositories {
mavenCentral()
jcenter()
maven {
url "http://www.stat.ubc.ca/~bouchard/maven/"
}
}
dependencies {
compile group: 'ca.ubc.stat', name: 'rejfree', version: '1.0.0'
}
git clone git@github.com:alexandrebouchard/rejfree.gitgradle installAppbuild/install/rejfree/lib/ into your classpathgit clone git@github.com:alexandrebouchard/rejfree.gitgradle eclipse from the root of the repositoryImport in File menuImport existing projects into workspaceCopy projects into workspace to avoid having duplicatesWe document here two usage scenarios: reproducing results from our paper, and creation of new models.
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:
rejfree.models.normal.CompareStanRFOnNormalModelrestrictVelocityNorm option as the organization of this command line argument has been changed since the time this experiment was ran):-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}
rejfree.models.normal.CompareStanRFOnNormalModel-useLocal true \
-nPairs @@{100,1000} \
-timeMilli 30000 \
-collectRate 0 \
-refreshRate @@{0.01,0.1,1,10} \
-refreshmentMethod @@{GLOBAL,LOCAL,RESTRICTED,PARTIAL}
rejfree.models.normal.CompareStanRFOnRN++plans/singleRunOnRNOptions/options-@@{1,2,3,4}.map \
-stanHome /home/bouchard/bin/cmdstan-2.7.0 \
-restrictVelocityNorm @@{true,false} \
-usePartialRefreshment false
rejfree.models.normal.CompareStanRFOnNormalModel-recordPartialSums true \
-stanHome /Users/bouchard/Documents/workspace-cpp/cmdstan-2.7.0 \
-nPairs @@{10,100,1000} \
-nRepeats 40 \
-variableMonitorInterval 100
rejfree.models.expfam.MRFMain-stanHome /home/bouchard/bin/cmdstan-2.7.0 \
-nStanIters @@{2^[4--12]} \
-randomForBothAlgorithms @@{1--10} \
-collectRate 0.0 \
-useLocalRefreshment true \
-restrictVelocityNorm false
Note: we are in the process of making this more user-friendly and better documented.
rejfree.models.expfam.MRF for an example, in particular the inner class rejfree.models.expfam.MRF$ModelSpecrejfree.local.CollisionFactor) are accessible in fields with the annotation @DefineFactor. The structure of the factor graph is built using reflection by looking at which factors have shared accessibility of some objects.rejfree.models.expfam.MRFMain for an exampleModelSpec modelSpec = mrf.newModelSpecFromGenerativeProcess(new Random(generateRandom));
LocalRFRunner rfRunner = new LocalRFRunner(localRFRunnerOption);
rfRunner.init(modelSpec);
rfRunner.addMomentRayProcessor();
rfRunner.run();\(\;\)