public abstract class AbstractBayesianDistribution
Expresses the common characteristics of a two-level distribution in which
the higher level distribution describes a prior distribution of parameters
for the lower level distribution. Generically speaking, we have
\theta ~ p_1(\alpha) \\
x | \theta ~ p_2(\theta)
Here learning involves computing the posterior distribution of \(\theta \mid x\). Note
that \(\theta\) is really a theoretical entity here and isn't really required of an
implementation. The only required operations include:
nextDouble() Sample \(x\) from the posterior of \(p_2\).
nextMean() Sample \(E[x]\) from the posterior of \(p_2\).
add() Add a new observation x to define a new posterior distribution.
posteriorDistribution() Return a copy of the posterior distribution.