Shared population mass accounting. Normalized selection weights and total mass are separate; neither asserts posterior accuracy or unbiased evidence. A zero-mass population has no posterior and cannot be drawn or resampled.
Two drivers keep the ledger: the population-path interpreter
(population/path: tempered SMC, θ-vector populations, population
programs) holds a mass state (from-log, reweight, selected,
resampled); the savepoint particle drivers (foerster.smc: SMC,
importance sampling, streaming, batched and conditional SMC, PGAS, and
through them PIMH, particle Gibbs and IPMCMC), whose raw weights live in
their particles' worlds, account each barrier with barrier. Both fold
the same log mass: the normalizer before plus the log mean weight.
Shared population mass accounting. Normalized selection weights and total mass are separate; neither asserts posterior accuracy or unbiased evidence. A zero-mass population has no posterior and cannot be drawn or resampled. Two drivers keep the ledger: the population-path interpreter (`population/path`: tempered SMC, θ-vector populations, population programs) holds a mass state (`from-log`, `reweight`, `selected`, `resampled`); the savepoint particle drivers (`foerster.smc`: SMC, importance sampling, streaming, batched and conditional SMC, PGAS, and through them PIMH, particle Gibbs and IPMCMC), whose raw weights live in their particles' worlds, account each barrier with `barrier`. Both fold the same log mass: the normalizer before plus the log mean weight.
(barrier xs log-normalizer)The accounting of a savepoint particle population at a barrier: xs its
raw log weights since its last resampling, log-normalizer the log mass
folded in before them. Returns
:selection normalized selection weights (normalize; uniform among the
impossible or the infinite, so that a degenerate population
can still be resampled)
:ess ess of the selection
:log-mean the barrier's factor of the evidence, log mean exp of xs
:log-mass the population's log mass, log-normalizer + :log-mean
(from-log's), which a resampling folds into the
normalizer as its children restart at equal weight
:reset the log weight the children restart from: 0, or −∞ when the
whole population is impossible (it stays impossible)
The accounting of a savepoint particle population at a barrier: `xs` its
raw log weights since its last resampling, `log-normalizer` the log mass
folded in before them. Returns
:selection normalized selection weights (`normalize`; uniform among the
impossible or the infinite, so that a degenerate population
can still be resampled)
:ess `ess` of the selection
:log-mean the barrier's factor of the evidence, log mean exp of `xs`
:log-mass the population's log mass, `log-normalizer` + `:log-mean`
(`from-log`'s), which a resampling folds into the
normalizer as its children restart at equal weight
:reset the log weight the children restart from: 0, or −∞ when the
whole population is impossible (it stays impossible)(ess ws)The effective sample size 1/Σw² of normalized selection weights ws.
The effective sample size 1/Σw² of normalized selection weights `ws`.
(from-log xs)(from-log xs log-normalizer)Canonical accounting from raw log weights and an accumulated log normalizer. log-mass is log-normalizer + logmeanexp(raw). A zero-mass state stays explicit.
Canonical accounting from raw log weights and an accumulated log normalizer. log-mass is log-normalizer + logmeanexp(raw). A zero-mass state stays explicit.
(normalize xs)(normalize xs {:keys [zero infinite]})Linear selection weights. Zero or infinite total mass requires an explicit :zero/:infinite :uniform policy (legacy selection inside existing engines).
Linear selection weights. Zero or infinite total mass requires an explicit :zero/:infinite :uniform policy (legacy selection inside existing engines).
(uniform n)(uniform n log-mass)Equal selection weights at the given total log mass.
Equal selection weights at the given total log mass.
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 |