Skip to main content

update

Function update 

Source
pub fn update(x: &Analytic, seen: Seen) -> OpResult<Option<(f64, Latent)>>
Expand description

An exact update of a draw x, read in the world it’s updated in, from observing seen with x itself as the parameter: the logarithm of the observation’s probability (a density for a normal), and what the world knows about the draw after it. None if the draw’s distribution isn’t the prior of a conjugate pair with this observation.

A draw restricted to part of its range stays restricted: its posterior is the updated family on the same values, and the probability includes the ratio of the updated and the current family’s mass there.