Liking cljdoc? Tell your friends :D

org.replikativ.foerster.nuts

The No-U-Turn sampler on block sites (foerster.block), within Gibbs, as Stan implements it: multinomial sampling over the trajectory, the generalized no-U-turn criterion with the checks across merged subtrees (Hoffman & Gelman 2014; Betancourt 2017), divergences when the energy error exceeds 1000, a diagonal metric, and during warm-up dual-averaging step size adaptation and windowed variance estimation of the metric (Stan's 75/25/50 windows, scaled to short warm-ups).

NUTS samples the block's own density, so the block's target must be the complete conditional of its latents (:block/target :complete-conditional): a replay that changes the log probability of anything outside the block is refused (::incomplete-target) — HMC (foerster.hmc), whose fixed trajectory allows a correction on the full trace, handles incomplete targets.

The kernel is (k/nuts-kernel iterations {:burn … :target-accept 0.8 :max-depth 10}): the first :burn iterations adapt and are dropped.

The No-U-Turn sampler on block sites (`foerster.block`), within Gibbs, as
Stan implements it: multinomial sampling over the trajectory, the
generalized no-U-turn criterion with the checks across merged subtrees
(Hoffman & Gelman 2014; Betancourt 2017), divergences when the energy error
exceeds 1000, a diagonal metric, and during warm-up dual-averaging step
size adaptation and windowed variance estimation of the metric (Stan's
75/25/50 windows, scaled to short warm-ups).

NUTS samples the block's own density, so the block's target must be the
complete conditional of its latents (`:block/target
:complete-conditional`): a replay that changes the log probability of
anything outside the block is refused (`::incomplete-target`) — HMC
(`foerster.hmc`), whose fixed trajectory allows a correction on the full
trace, handles incomplete targets.

The kernel is `(k/nuts-kernel iterations {:burn … :target-accept 0.8
:max-depth 10})`: the first `:burn` iterations adapt and are dropped.
raw docstring

transitionclj/s

(transition dist q0 eps inv-metric max-depth)

One NUTS transition of dist (a block distribution) from position q0 with step size eps and diagonal inverse metric inv-metric, drawing from the current generator. Returns {:q :accept-stat :depth :n-leapfrog :divergent?}.

One NUTS transition of `dist` (a block distribution) from position `q0`
with step size `eps` and diagonal inverse metric `inv-metric`, drawing from
the current generator. Returns {:q :accept-stat :depth :n-leapfrog
:divergent?}.
sourceraw docstring

within-gibbsclj/s

(within-gibbs {:keys [burn target-accept max-depth]
               :or {burn 0 target-accept 0.8 max-depth 10}})

A step for foerster.trace/mh-chain (:step): a NUTS move of every block site, then one single-site MH move of a latent that is not a block site, if there is one. A fresh adaptation state per call (per chain). opts: :burn, :target-accept (0.8), :max-depth (10).

A step for `foerster.trace/mh-chain` (`:step`): a NUTS move of every block
site, then one single-site MH move of a latent that is not a block site, if
there is one. A fresh adaptation state per call (per chain). `opts`:
`:burn`, `:target-accept` (0.8), `:max-depth` (10).
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