kumulant

BernoulliArm

@Serializable
@SerialName(value = "BernoulliArm")
data class BernoulliArm(val priorAlpha: Double = 1.0, val priorBeta: Double = 1.0) : Arm<BernoulliSumResult> (source)

Bernoulli arm. The reward is binary {0, 1} and the unknown is the success probability p. A Beta(priorAlpha, priorBeta) prior is conjugate to the Bernoulli likelihood; the posterior is Beta(priorAlpha + successes, priorBeta + failures).

Default Beta(1, 1) is the uniform prior on p; neutral, the standard "I know nothing" starting point. Beta(1, 9) is mildly pessimistic (expecting failures), Beta(9, 1) mildly optimistic.

Pair with BetaPosterior for Thompson sampling or UCB1 for the confidence-bound family.

Constructors

Link copied to clipboard
constructor(priorAlpha: Double = 1.0, priorBeta: Double = 1.0)

Types

Link copied to clipboard
object Companion

Factory entry-point for BernoulliArm (host for warmStart).

Properties

Link copied to clipboard

Prior pseudo-count of successes. Higher = stronger belief that the arm is good.

Link copied to clipboard

Prior pseudo-count of failures. Higher = stronger belief that the arm is bad.

Functions

Link copied to clipboard

Allocate a fresh per-arm accumulator already seeded with this arm's prior pseudo-counts.

Link copied to clipboard
open fun encode(value: Double): Double

Map a raw observation onto the scale the stat accumulates. Identity by default; LogNormalArm overrides with ln so the underlying stat tracks the log-reward and the Normal-Gamma posterior fits the log-normal generative model.

BernoulliArm

constructor(priorAlpha: Double = 1.0, priorBeta: Double = 1.0)(source)

createStat

Allocate a fresh per-arm accumulator already seeded with this arm's prior pseudo-counts.

priorAlpha

Prior pseudo-count of successes. Higher = stronger belief that the arm is good.

priorBeta

Prior pseudo-count of failures. Higher = stronger belief that the arm is bad.