foerster for code that runs in an interpreter sandbox (dvergr's SCI sandbox): what such code may call, as namespace maps a host installs, and the plain data inference results become before they reach it.
(namespaces opts) gives {ns-sym {sym value}} and docs the arglists and
docstrings for each. The host owns everything an interpreter cannot: it
makes sample/observe effect breakpoints, installs these maps, decides
the world policy and the limits, and owns the lifecycle of started jobs.
infer/ run inference (every foerster.core/infer method), as a spin or
as a job; posterior accessors and summaries
model/ numerical blocks: a log density over θ as one choice site
opt/ MAP, Laplace, Pathfinder on a block site
diag/ R-hat, ESS, MCSE and summaries of a posterior's chains
lp/ log densities summed over data vectors, computed on the host
No result carries an execution context, a world handle or an executor:
posterior projects a measure to values, weights and its chain
structure. Seeds are per run (:seed); the process generator is not
exposed.
foerster for code that runs in an interpreter sandbox (dvergr's SCI
sandbox): what such code may call, as namespace maps a host installs, and
the plain data inference results become before they reach it.
`(namespaces opts)` gives {ns-sym {sym value}} and `docs` the arglists and
docstrings for each. The host owns everything an interpreter cannot: it
makes `sample`/`observe` effect breakpoints, installs these maps, decides
the world policy and the limits, and owns the lifecycle of started jobs.
infer/ run inference (every `foerster.core/infer` method), as a spin or
as a job; posterior accessors and summaries
model/ numerical blocks: a log density over θ as one choice site
opt/ MAP, Laplace, Pathfinder on a block site
diag/ R-hat, ESS, MCSE and summaries of a posterior's chains
lp/ log densities summed over data vectors, computed on the host
No result carries an execution context, a world handle or an executor:
`posterior` projects a measure to values, weights and its chain
structure. Seeds are per run (`:seed`); the process generator is not
exposed.(bernoulli-logit-glm ys xs alpha beta)Σᵢ log Bernoulli(yᵢ | logit⁻¹(α + xᵢ·β)), yᵢ in {0, 1}.
Σᵢ log Bernoulli(yᵢ | logit⁻¹(α + xᵢ·β)), yᵢ in {0, 1}.
(cancel-job! job)Cancel job, as :on-start received it (for the host: on a timeout or
when its world ends).
Cancel `job`, as `:on-start` received it (for the host: on a timeout or when its world ends).
(chains post f)Draws of f by chain: one chain when the posterior has no chain structure.
Draws of `f` by chain: one chain when the posterior has no chain structure.
(data? x)Whether x is plain data: nil, numbers, strings, keywords, symbols,
booleans, characters, and vectors, lists, sets and maps of them.
Whether `x` is plain data: nil, numbers, strings, keywords, symbols, booleans, characters, and vectors, lists, sets and maps of them.
{ns-sym {sym [arglists docstring]}} for namespaces.
{ns-sym {sym [arglists docstring]}} for `namespaces`.
(namespaces host){ns-sym {sym value}} for a sandbox. Host options: :world-policy (the
default for particle runs that do not choose one; Markov chains always
run in fresh worlds), :max-work (the largest
particles or iterations × chains a run may ask for), :max-optimizer-work
(the same for optimizers, in target evaluations, optimizer-work),
:seed (the
session's: runs and optimizers without their own :seed draw theirs from
it, never from the process generator), :on-start (called with every
started job: the host cancels what it still runs when its world ends,
cancel-job!).
{ns-sym {sym value}} for a sandbox. Host options: `:world-policy` (the
default for particle runs that do not choose one; Markov chains always
run in fresh worlds), `:max-work` (the largest
particles or iterations × chains a run may ask for), `:max-optimizer-work`
(the same for optimizers, in target evaluations, `optimizer-work`),
`:seed` (the
session's: runs and optimizers without their own `:seed` draw theirs from
it, never from the process generator), `:on-start` (called with every
started job: the host cancels what it still runs when its world ends,
`cancel-job!`).(normal ys mu sigma)Σᵢ log N(yᵢ | μᵢ, σ): mu a number or a vector like ys.
Σᵢ log N(yᵢ | μᵢ, σ): `mu` a number or a vector like `ys`.
(normal-glm ys xs alpha beta sigma)Σᵢ log N(yᵢ | α + xᵢ·β, σ), xs a vector of rows.
Σᵢ log N(yᵢ | α + xᵢ·β, σ), `xs` a vector of rows.
(poisson-log-glm ys xs alpha beta)Σᵢ log Poisson(yᵢ | exp(α + xᵢ·β)), yᵢ counts.
Σᵢ log Poisson(yᵢ | exp(α + xᵢ·β)), yᵢ counts.
(posterior measure)The plain-data projection of measure: program values, log weights and
normalized weights, ESS, log marginal, canonical world descriptors, and —
for Markov chains — the chain lengths, in draw order. Refuses a measure
whose particles all have zero weight, and program values that are not
plain data (data?): nothing else crosses into the sandbox.
The plain-data projection of `measure`: program values, log weights and normalized weights, ESS, log marginal, canonical world descriptors, and — for Markov chains — the chain lengths, in draw order. Refuses a measure whose particles all have zero weight, and program values that are not plain data (`data?`): nothing else crosses into the sandbox.
(query post f)f of every value with its weight: [[x w] …].
`f` of every value with its weight: [[x w] …].
(summary post & [f])Weighted mean, sd and 5/25/50/75/95% quantiles of the quantity f of the
posterior's values (a function, a keyword, an index, or nil for the value
itself), and for Markov chains R-hat, bulk and tail ESS and MCSE.
Weighted mean, sd and 5/25/50/75/95% quantiles of the quantity `f` of the posterior's values (a function, a keyword, an index, or nil for the value itself), and for Markov chains R-hat, bulk and tail ESS and MCSE.
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 |