Tempered SMC: an SMC sampler (Del Moral, Doucet & Jasra 2006) over whole program traces, from the prior to the posterior through the targets
π_β(x) ∝ p(x) · L(x)^β, 0 = β_0 < β_1 < … < β_T = 1,
L the product of the program's observations and factors. Every particle is
a complete run of the program (foerster.gfi), recorded at temperature 0
with each observation's untempered log-likelihood in its note. A step picks
the next β adaptively, so that the conditional ESS of the incremental
weights L^(β'−β) is :ess-target·N (Zhou, Johansen & Aston 2016), reweights,
resamples and moves every particle by Metropolis-Hastings targeting π_β'
(foerster.trace/mh-step at that temperature; random-walk proposals scaled
by the population's spread on continuous sites, prior proposals on the
others). The evidence estimate is the product of the steps' mean
incremental weights.
With :waste-free P (Dau & Chopin 2022) a step resamples N/P particles
and keeps every state of their P-step chains as particles.
For data that arrive one observation at a time (IBIS), use SMC with
resample-move instead (foerster.smc, :anchors on the static
parameters).
Tempered SMC: an SMC sampler (Del Moral, Doucet & Jasra 2006) over whole program traces, from the prior to the posterior through the targets π_β(x) ∝ p(x) · L(x)^β, 0 = β_0 < β_1 < … < β_T = 1, L the product of the program's observations and factors. Every particle is a complete run of the program (`foerster.gfi`), recorded at temperature 0 with each observation's untempered log-likelihood in its note. A step picks the next β adaptively, so that the conditional ESS of the incremental weights L^(β'−β) is `:ess-target`·N (Zhou, Johansen & Aston 2016), reweights, resamples and moves every particle by Metropolis-Hastings targeting π_β' (`foerster.trace/mh-step` at that temperature; random-walk proposals scaled by the population's spread on continuous sites, prior proposals on the others). The evidence estimate is the product of the steps' mean incremental weights. With `:waste-free P` (Dau & Chopin 2022) a step resamples N/P particles and keeps every state of their P-step chains as particles. For data that arrive one observation at a time (IBIS), use SMC with resample-move instead (`foerster.smc`, `:anchors` on the static parameters).
(tempered model
n
&
[{:keys [ess-target moves scale waste-free max-steps executor]
:or {ess-target 0.5 scale 2.38 max-steps 1000}}])Tempered SMC of model (a spin) with n particles. Options:
:ess-target the conditional ESS fraction each step keeps (default 0.5): higher, more and smaller temperature steps :moves single-site MH moves per particle per step (default: one sweep, as many as the particle has latent sites) :scale random-walk scale, in population standard deviations (default 2.38) :waste-free P: resample n/P particles and keep every state of their P-step chains (n must be a multiple of P) :max-steps refuse to run longer (default 1000) :executor the particle worlds' executor
Returns a CPS operation resolving an EmpiricalMeasure of Samples whose
m/log-marginal estimates the evidence; :temperatures holds the
schedule and :rejuvenation the moves made and accepted.
Tempered SMC of `model` (a spin) with `n` particles. Options:
:ess-target the conditional ESS fraction each step keeps (default 0.5):
higher, more and smaller temperature steps
:moves single-site MH moves per particle per step (default: one
sweep, as many as the particle has latent sites)
:scale random-walk scale, in population standard deviations
(default 2.38)
:waste-free P: resample n/P particles and keep every state of their
P-step chains (n must be a multiple of P)
:max-steps refuse to run longer (default 1000)
:executor the particle worlds' executor
Returns a CPS operation resolving an EmpiricalMeasure of `Sample`s whose
`m/log-marginal` estimates the evidence; `:temperatures` holds the
schedule and `:rejuvenation` the moves made and accepted.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 |