Expand description
Exact updates for conjugate priors (docs/semantics.md, section 14): the probability of an observation when its parameter is unknown, and the parameter’s distribution after it.
Probabilities are computed as logarithms. A run’s weight has an extended
exponent, but one observation’s probability can already be far below the
smallest f64: 0 successes out of 100,000 with a rate near 50% has a
probability of e^−4234.
Enums§
- Seen
- What an observation saw, with its parameters besides the variable.
Functions§
- is_
prior - Whether a draw from
familymay be delayed: it’s the prior of a conjugate pair. - update
- Observing
seen, with the variable distributed asprior: the natural logarithm of the observation’s probability (a density forNormal), and the variable’s distribution after it.Noneif the two aren’t a conjugate pair. A logarithm of −∞ means the observation is impossible, like a count above the number of trials; the prior is returned then.