kumulant

Posterior

@Serializable
sealed interface Posterior<R : Result>(source)

Stateless conjugate posterior over a univariate likelihood, parameterised by the sufficient-statistic snapshot R. A Posterior is a pure (snapshot, rng) -> sample function: no priors, no per-arm state, no update path. Arm lifecycle, value encoding, and prior seeding all live in Arm.

Sealed + @Serializable so a (arm, posterior) Thompson configuration is wire-portable via the kumulant/skema serialization convention. The posterior assumes the snapshot already incorporates whatever pseudo-counts the caller wants; with a seeded snapshot the empty-snapshot edge case can't arise.

Inheritors

Functions

Link copied to clipboard
abstract fun sample(snapshot: R, rng: Random): Double

Draw a single Monte Carlo sample of the arm's reward from its posterior.

sample

abstract fun sample(snapshot: R, rng: Random): Double(source)

Draw a single Monte Carlo sample of the arm's reward from its posterior.