Liking cljdoc? Tell your friends :D

org.replikativ.foerster.block-mh

Random-walk Metropolis on block sites (foerster.block), run on the block's θ vector: a move takes several Gaussian steps against the block's own density and writes the result back to the trace once, as NUTS does (foerster.nuts), so the trace replay is paid per move rather than per density evaluation.

The density is the block's target, or at temperature β the geometric path q^(1-β)·t^β from its draw density q to its target t (tempered SMC, foerster.tempering). The block's target must be the complete conditional of its latents: a write-back that changes the log probability of anything outside the block is refused (::incomplete-target).

within-gibbs is the step of the random-walk MH kernel: block sites move this way, with per-coordinate scales adapted during the chain's :burn iterations (a diagonal adaptive Metropolis whose overall scale steers the acceptance rate toward 0.234), then one single-site random-walk move of a latent that is not a block site, if there is one. A trace without block sites makes the same moves as before.

Random-walk Metropolis on block sites (`foerster.block`), run on the
block's θ vector: a move takes several Gaussian steps against the block's
own density and writes the result back to the trace once, as NUTS does
(`foerster.nuts`), so the trace replay is paid per move rather than per
density evaluation.

The density is the block's target, or at temperature β the geometric path
q^(1-β)·t^β from its draw density q to its target t (tempered SMC,
`foerster.tempering`). The block's target must be the complete conditional
of its latents: a write-back that changes the log probability of anything
outside the block is refused (`::incomplete-target`).

`within-gibbs` is the step of the random-walk MH kernel: block sites move
this way, with per-coordinate scales adapted during the chain's `:burn`
iterations (a diagonal adaptive Metropolis whose overall scale steers the
acceptance rate toward 0.234), then one single-site random-walk move of a
latent that is not a block site, if there is one. A trace without block
sites makes the same moves as before.
raw docstring

block-site?clj/s

(block-site? trace address)
source

densityclj/s

(density dist beta)

The log density a move of a block site with law dist targets: its target t, or at temperature beta the path q^(1-β)·t^β from its draw density q.

The log density a move of a block site with law `dist` targets: its target
t, or at temperature `beta` the path q^(1-β)·t^β from its draw density q.
sourceraw docstring

moveclj/s

(move trace address {:keys [beta scales steps key keep-old?]})

One block move of the site at address: steps random-walk steps of scales against its density at beta (nil: untempered), drawing from the stream keyed by key, then one write-back (keep-old? as for it). Resolves {:trace :accepted :steps}; the trace is unchanged when no step was accepted.

One block move of the site at `address`: `steps` random-walk steps of
`scales` against its density at `beta` (nil: untempered), drawing from the
stream keyed by `key`, then one write-back (`keep-old?` as for it).
Resolves {:trace :accepted :steps}; the trace is unchanged when no step was
accepted.
sourceraw docstring

walkclj/s

(walk f q0 scales steps)

steps random-walk Metropolis steps from q0 against the log density f, coordinate j stepping by scales[j] standard normals. Resolves {:q final :accepted k}.

`steps` random-walk Metropolis steps from `q0` against the log density `f`,
coordinate j stepping by `scales`[j] standard normals. Resolves
{:q final :accepted k}.
sourceraw docstring

within-gibbsclj/s

(within-gibbs {:keys [step-size burn steps] :or {burn 0}})

A step for foerster.trace/mh-chain (:step): a block move of every block site, then one single-site random-walk MH move of a latent that is not a block site, if there is one. Per-coordinate scales adapt during the first :burn iterations and are fixed after. opts: :step-size (the initial and single-site scale), :burn, :steps (random-walk steps per block move; default the block's dimension).

A step for `foerster.trace/mh-chain` (`:step`): a block move of every block
site, then one single-site random-walk MH move of a latent that is not a
block site, if there is one. Per-coordinate scales adapt during the first
`:burn` iterations and are fixed after. `opts`: `:step-size` (the initial
and single-site scale), `:burn`, `:steps` (random-walk steps per block
move; default the block's dimension).
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