Liking cljdoc? Tell your friends :D
All platforms.

org.replikativ.foerster.enumerate

Exact inference by enumeration, for programs whose latent choices all have finite support (dist/support): at every latent sample site the particle's world forks once per value, each branch weighted by that value's probability, and observations and factors score as usual. Every branch that ends is one outcome with its exact joint probability, so the measure is the exact posterior and its m/log-marginal the exact evidence.

Branches share the program up to the site where they part — the world fork is a copy-on-write of everything computed so far — so the cost is the number of branches, not that number times the program's length. That number grows exponentially with the latent sites: enumeration is an oracle for small discrete models, and the reference other methods are checked against.

(infer/infer (model) {:method :enumerate})

A latent site with infinite or continuous support is refused (::infinite-support); :max-branches (default 100000) bounds the work.

Exact inference by enumeration, for programs whose latent choices all have
finite support (`dist/support`): at every latent sample site the particle's
world forks once per value, each branch weighted by that value's
probability, and observations and factors score as usual. Every branch that
ends is one outcome with its exact joint probability, so the measure is the
exact posterior and its `m/log-marginal` the exact evidence.

Branches share the program up to the site where they part — the world fork
is a copy-on-write of everything computed so far — so the cost is the
number of branches, not that number times the program's length. That
number grows exponentially with the latent sites: enumeration is an oracle
for small discrete models, and the reference other methods are checked
against.

  (infer/infer (model) {:method :enumerate})

A latent site with infinite or continuous support is refused
(`::infinite-support`); `:max-branches` (default 100000) bounds the work.
raw docstring

enumerateclj/s

(enumerate model
           &
           [{:keys [max-branches policy executor] :or {max-branches 100000}}])

Exact enumeration of model (a spin), see the namespace. Options: :max-branches, :policy (a foerster.trace/policy for the sites that are not enumerated: observations, factors, deterministic sites), :executor. Resolves an EmpiricalMeasure of Samples, one per complete branch.

Exact enumeration of `model` (a spin), see the namespace. Options:
`:max-branches`, `:policy` (a `foerster.trace/policy` for the sites that
are not enumerated: observations, factors, deterministic sites), `:executor`.
Resolves an EmpiricalMeasure of `Sample`s, one per complete branch.
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