NUTS inference returning portable chains, and convergence diagnostics.
fit samples a built model with Foerster's NUTS and returns a plain-data
posterior (see io for persistence); diagnostics-summary checks it.
NUTS inference returning portable chains, and convergence diagnostics. `fit` samples a built model with Foerster's NUTS and returns a plain-data posterior (see `io` for persistence); `diagnostics-summary` checks it.
Convergence gates used by diagnostics-summary: R-hat strictly below
1.01, bulk and tail ESS of at least 100 for every parameter, no divergences.
Convergence gates used by `diagnostics-summary`: R-hat strictly below 1.01, bulk and tail ESS of at least 100 for every parameter, no divergences.
(diagnostics-summary posterior)(diagnostics-summary posterior gates)Summarize convergence of a posterior from fit (or io/read!).
Returns
gates
(default default-gates), and the :gates that were applied.Summarize convergence of a posterior from `fit` (or `io/read!`).
Returns
- :parameters, a map from parameter name (e.g. [:beta "search"]) to
{:mean :sd :rhat :ess-bulk :ess-tail :mcse :quantiles}, in draw order;
- :max-rhat, :min-ess-bulk and :min-ess-tail over all parameters (nil when
any of them is not finite) and :finite?;
- :divergences and :depth-limit-visits from the sampler statistics;
- :passes? when every parameter and the divergence count meet `gates`
(default `default-gates`), and the :gates that were applied.(fit model)(fit model
{:keys [draws tune chains seed target-accept max-depth timeout-ms init
gradient-backend metric jitter]
:as options
:or {max-depth 8
target-accept 0.9
gradient-backend :aot
metric :variance
timeout-ms 7200000
draws 1000
jitter false
tune 1000
chains 4
seed 42}})Fit a complete density block and detach its result from execution worlds. :draws excludes :tune. :timeout-ms bounds the whole fit, including gradient compilation (default 2 hours; nil disables the bound); on timeout the fit's world is cancelled and an exception is thrown. :gradient-backend defaults to :aot; :runtime selects raster runtime AD. :metric is :variance (default) or :fisher. :jitter defaults to false to keep the supplied initial position; true enables Foerster's per-chain jitter. Sampler diagnostics remain aligned with their retained chain and draw.
Fit a complete density block and detach its result from execution worlds. :draws excludes :tune. :timeout-ms bounds the whole fit, including gradient compilation (default 2 hours; nil disables the bound); on timeout the fit's world is cancelled and an exception is thrown. :gradient-backend defaults to :aot; :runtime selects raster runtime AD. :metric is :variance (default) or :fisher. :jitter defaults to false to keep the supplied initial position; true enables Foerster's per-chain jitter. Sampler diagnostics remain aligned with their retained chain and draw.
(parameter-names model)Parameter names of a built model, in posterior draw order, e.g. [:alpha "search"].
Parameter names of a built model, in posterior draw order, e.g. [:alpha "search"].
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 |