Particle MCMC drivers: PIMH and particle Gibbs (Andrieu, Doucet &
Holenstein 2010), PGAS (Lindsten, Jordan & Schön 2014) and iPMCMC
(Rainforth et al. 2016). In fresh worlds PIMH, particle Gibbs and PGAS
run on savepoint SMC (foerster.inference.smc); in canonical worlds, and
iPMCMC always, they run over SMC sweeps (foerster.inference.particle-mcmc).
Particle MCMC drivers: PIMH and particle Gibbs (Andrieu, Doucet & Holenstein 2010), PGAS (Lindsten, Jordan & Schön 2014) and iPMCMC (Rainforth et al. 2016). In fresh worlds PIMH, particle Gibbs and PGAS run on savepoint SMC (`foerster.inference.smc`); in canonical worlds, and iPMCMC always, they run over SMC sweeps (`foerster.inference.particle-mcmc`).
(ipmcmc-infer model-task num-particles num-iterations & [opts])Interacting Particle MCMC inference.
Runs M nodes in parallel, where M_c nodes run conditional SMC (with retained particles) and M_s nodes run plain SMC. After each sweep, performs Gibbs updates on which nodes become CSMC based on marginal likelihood estimates.
This creates 'interaction' between parallel chains: nodes with higher log-Z are more likely to have their particles retained in future sweeps.
Algorithm:
Args: model-task - Spin representing probabilistic program num-particles - Number of particles per sweep (per node) num-iterations - Number of IPMCMC iterations opts - Optional map with: :num-nodes - Total number of nodes (default 8) :num-csmc-nodes - Number of CSMC nodes (default num-nodes/2) :executor - Shared executor :all-particles? - Return all particles or one per node (default true) and the other particle methods' options except :resample-threshold
Every node, conditional or not, resamples at every barrier by multinomial
draws: iPMCMC's extended target needs each conditional node to be the
conditional of the very SMC the free nodes run, since the Gibbs draw of
the conditional nodes compares their evidence estimates (Rainforth et al.
2016, §3; Anglican's ipmcmc.clj runs both node types alike). An
ESS-adaptive free node would not be, so :resample-threshold is refused.
Returns: Spin<EmpiricalMeasure>
Reference: Rainforth et al., 'Interacting Particle Markov Chain Monte Carlo', ICML 2016
Interacting Particle MCMC inference.
Runs M nodes in parallel, where M_c nodes run conditional SMC (with retained
particles) and M_s nodes run plain SMC. After each sweep, performs Gibbs
updates on which nodes become CSMC based on marginal likelihood estimates.
This creates 'interaction' between parallel chains: nodes with higher log-Z
are more likely to have their particles retained in future sweeps.
Algorithm:
1. Initialize: Run SMC on all nodes
2. For each iteration:
a. Run CSMC on M_c nodes (with retained particles from previous sweep)
b. Run SMC on M_s nodes (fresh)
c. Collect log-Z estimates from each node
d. Gibbs update: sample which nodes become CSMC for next sweep
e. Extract retained particles for selected CSMC nodes
3. Output: Weighted samples from all nodes with Rao-Blackwellized weights
Args:
model-task - Spin representing probabilistic program
num-particles - Number of particles per sweep (per node)
num-iterations - Number of IPMCMC iterations
opts - Optional map with:
:num-nodes - Total number of nodes (default 8)
:num-csmc-nodes - Number of CSMC nodes (default num-nodes/2)
:executor - Shared executor
:all-particles? - Return all particles or one per node (default true)
and the other particle methods' options except :resample-threshold
Every node, conditional or not, resamples at every barrier by multinomial
draws: iPMCMC's extended target needs each conditional node to be the
conditional of the very SMC the free nodes run, since the Gibbs draw of
the conditional nodes compares their evidence estimates (Rainforth et al.
2016, §3; Anglican's ipmcmc.clj runs both node types alike). An
ESS-adaptive free node would not be, so `:resample-threshold` is refused.
Returns: Spin<EmpiricalMeasure>
Reference:
Rainforth et al., 'Interacting Particle Markov Chain Monte Carlo', ICML 2016(pgas-infer model-task num-particles num-iterations & [opts])Particle Gibbs with Ancestor Sampling (Lindsten et al. 2014).
Like pgibbs-infer, but at every barrier the retained particle redraws
which particle's past it continues from, with weights
w_i · p(retained future | particle i's past) computed by re-running each
particle's future on the retained values. Improves mixing on state-space
models; costs a forward re-run per particle per barrier.
Returns: Spin<EmpiricalMeasure> of every sweep's particles, each sweep normalized to total weight one.
Particle Gibbs with Ancestor Sampling (Lindsten et al. 2014). Like `pgibbs-infer`, but at every barrier the retained particle redraws which particle's past it continues from, with weights w_i · p(retained future | particle i's past) computed by re-running each particle's future on the retained values. Improves mixing on state-space models; costs a forward re-run per particle per barrier. Returns: Spin<EmpiricalMeasure> of every sweep's particles, each sweep normalized to total weight one.
(pgibbs-infer model-task num-particles num-iterations & [opts])Particle Gibbs (conditional SMC, Andrieu et al. 2010).
Args:
model-task, num-particles (per sweep, including the retained one),
num-iterations (sweeps)
opts: the particle methods' options, and :anchors, :rejuvenate for
resample-move inside each sweep, the retained particle included
(foerster.inference.smc/smc; :fresh only)
Returns: Spin<EmpiricalMeasure> of every sweep's particles, each sweep normalized to total weight one.
Particle Gibbs (conditional SMC, Andrieu et al. 2010).
Args:
model-task, num-particles (per sweep, including the retained one),
num-iterations (sweeps)
opts: the particle methods' options, and :anchors, :rejuvenate for
resample-move inside each sweep, the retained particle included
(`foerster.inference.smc/smc`; :fresh only)
Returns: Spin<EmpiricalMeasure> of every sweep's particles, each sweep
normalized to total weight one.(pimh-infer model-task num-particles num-iterations & [opts])Particle Independent Metropolis-Hastings (Andrieu et al. 2010).
Each iteration proposes a fresh SMC sweep and accepts it with probability min(1, Ẑ_new / Ẑ_current); the current sweep's particles, normalized, are emitted every iteration.
Args: model-task, num-particles (per sweep), num-iterations opts: :executor, :resample-threshold
Returns: Spin<EmpiricalMeasure>
Particle Independent Metropolis-Hastings (Andrieu et al. 2010). Each iteration proposes a fresh SMC sweep and accepts it with probability min(1, Ẑ_new / Ẑ_current); the current sweep's particles, normalized, are emitted every iteration. Args: model-task, num-particles (per sweep), num-iterations opts: :executor, :resample-threshold Returns: Spin<EmpiricalMeasure>
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |