Liking cljdoc? Tell your friends :D

org.replikativ.foerster.weights

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.
raw docstring

barrierclj/s

(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)
sourceraw docstring

essclj/s

(ess ws)

The effective sample size 1/Σw² of normalized selection weights ws.

The effective sample size 1/Σw² of normalized selection weights `ws`.
sourceraw docstring

from-logclj/s

(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.
sourceraw docstring

log-mean-expclj/s

(log-mean-exp xs)
source

log-sum-expclj/s

(log-sum-exp xs)
source

normalizeclj/s

(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).
sourceraw docstring

resampledclj/s

(resampled state n)
source

reweightclj/s

(reweight state increments)
source

selectionclj/s

(selection state)
source

uniformclj/s

(uniform n)
(uniform n log-mass)

Equal selection weights at the given total log mass.

Equal selection weights at the given total log mass.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close