A Markov-chain measure as ArviZ's InferenceData groups, for
az.from_dict:
(spit "run.json" (arviz/->json (arviz/inference-data chains {:predictive pp})))
d = json.load(open("run.json")) idata = az.from_dict(**d)
Groups: posterior (the latent sites, and a block site's latents by name
in their own coordinates), log_likelihood (pointwise-log-likelihood),
observed_data, and with :predictive (the draws of
infer/predictive) posterior_predictive. Each variable is nested
[chain][draw] (the measure's :chain-lengths; chains of unequal length
are cut to the shortest), then its own dimensions. Addresses become
variable names: :mu is mu; [:y 3] is element 3 of an array y
(several integer indices, a multidimensional one); any other address its
printed form. A missing element is NaN.
A Markov-chain measure as ArviZ's InferenceData groups, for
`az.from_dict`:
(spit "run.json" (arviz/->json (arviz/inference-data chains {:predictive pp})))
# python
d = json.load(open("run.json"))
idata = az.from_dict(**d)
Groups: `posterior` (the latent sites, and a block site's latents by name
in their own coordinates), `log_likelihood` (`pointwise-log-likelihood`),
`observed_data`, and with `:predictive` (the draws of
`infer/predictive`) `posterior_predictive`. Each variable is nested
[chain][draw] (the measure's `:chain-lengths`; chains of unequal length
are cut to the shortest), then its own dimensions. Addresses become
variable names: `:mu` is `mu`; `[:y 3]` is element 3 of an array `y`
(several integer indices, a multidimensional one); any other address its
printed form. A missing element is NaN.(->json data)data (maps, vectors, numbers, strings, keywords, booleans, nil) as JSON;
NaN and infinities as Python's json module reads them.
`data` (maps, vectors, numbers, strings, keywords, booleans, nil) as JSON; NaN and infinities as Python's json module reads them.
(inference-data measure & [{:keys [predictive]}])The InferenceData groups of measure (equally weighted draws, by
chain), see the namespace. :predictive: draws of infer/predictive.
The InferenceData groups of `measure` (equally weighted draws, by chain), see the namespace. `:predictive`: draws of `infer/predictive`.
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 |