Liking cljdoc? Tell your friends :D

org.replikativ.foerster.inference.posterior

Reading a posterior measure: weighted statistics of the program's value (query), draws passed to a function (predict), and posterior predictive replays of a model (predictive).

Reading a posterior measure: weighted statistics of the program's value
(`query`), draws passed to a function (`predict`), and posterior
predictive replays of a model (`predictive`).
raw docstring

bp__org.replikativ.spindel.effects.await_SLASH_awaitclj

source

bp__org.replikativ.spindel.effects.await_SLASH_await_finalizationclj

source

bp__org.replikativ.spindel.effects.savepoint_SLASH_savepointclj

source

bp__org.replikativ.spindel.effects.track_SLASH_trackclj

source

predictclj/s

(predict measure pred-fn num-samples)

num-samples draws from measure, resampled by weight, each passed to pred-fn — which gets the particle (a Sample, or a context), so m/get-value reads its program value and m/get-trace its trace.

`num-samples` draws from `measure`, resampled by weight, each passed to
`pred-fn` — which gets the particle (a `Sample`, or a context), so
`m/get-value` reads its program value and `m/get-trace` its trace.
sourceraw docstring

predictiveclj/s

(predictive model measure n & [{:keys [interventions]}])

n posterior predictive draws: particles of measure drawn by weight, each replayed through model with its latent choices held and its observed sites drawing fresh values instead of scoring the data. A prior predictive draw runs model with (itrace/policy {:simulate-observed? true}) (gfi/run-policy); gfi/simulate would score the data instead.

model need not be the program that was conditioned: the same program on new inputs (more weeks, other covariates) predicts them, its latent sites held where the posterior has them and drawn from their prior where it does not (a new group's effect). :interventions ({selector transform}, as foerster.runtime.trace/policy takes them) sets sites by the do-operator first — a scenario under the posterior.

Returns a spin resolving a vector of {:value v :observations {address x}}: the program's value and what each observed site drew.

`n` posterior predictive draws: particles of `measure` drawn by weight,
each replayed through `model` with its latent choices held and its
observed sites drawing fresh values instead of scoring the data. A prior
predictive draw runs `model` with `(itrace/policy {:simulate-observed?
true})` (`gfi/run-policy`); `gfi/simulate` would score the data instead.

`model` need not be the program that was conditioned: the same program on
new inputs (more weeks, other covariates) predicts them, its latent sites
held where the posterior has them and drawn from their prior where it
does not (a new group's effect). `:interventions` ({selector transform},
as `foerster.runtime.trace/policy` takes them) sets sites by the do-operator
first — a scenario under the posterior.

Returns a spin resolving a vector of {:value v :observations {address x}}:
the program's value and what each observed site drew.
sourceraw docstring

queryclj/s

(query measure query-fn)

Weighted statistics of a numeric function of the program's value over measure: query-fn is identity (the value itself), a keyword (a field of a map value) or a function of the value.

Returns {:mean :variance :std-dev :quantiles :samples :weights :type}; :samples and :weights are the particles' values and normalized weights.

Weighted statistics of a numeric function of the program's value over
`measure`: `query-fn` is `identity` (the value itself), a keyword (a field
of a map value) or a function of the value.

Returns {:mean :variance :std-dev :quantiles :samples :weights :type};
`:samples` and `:weights` are the particles' values and normalized
weights.
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