kumulant

TopTwoThompsonSpec

@Serializable
@SerialName(value = "TopTwoThompson")
data class TopTwoThompsonSpec<R : Result>(val nbrArms: Int, val policy: ThompsonSamplingSpec<R>, val beta: Double = 0.5, val maxResamples: Int = 32) : UnivariateBanditSpec(source)

Spec for TopTwoThompsonBandit.

Constructors

Link copied to clipboard
constructor(nbrArms: Int, policy: ThompsonSamplingSpec<R>, beta: Double = 0.5, maxResamples: Int = 32)

Properties

Link copied to clipboard

Probability of playing the round's top sample.

Link copied to clipboard

Cap on the resample loop when searching for the second arm.

Link copied to clipboard

Number of arms in the population.

Link copied to clipboard

Thompson sampling policy carrying the per-arm posterior.

Functions

Link copied to clipboard
fun <R : Result> TopTwoThompsonSpec<R>.materialize(random: Random = Random.Default): TopTwoThompsonBandit<R>

Build a live TopTwoThompsonBandit from its spec.

fun UnivariateBanditSpec.materialize(random: Random = Random.Default): Bandit

Dispatch any UnivariateBanditSpec to its concrete bandit.

TopTwoThompsonSpec

constructor(nbrArms: Int, policy: ThompsonSamplingSpec<R>, beta: Double = 0.5, maxResamples: Int = 32)(source)

beta

Probability of playing the round's top sample.

maxResamples

Cap on the resample loop when searching for the second arm.

nbrArms

Number of arms in the population.

policy

Thompson sampling policy carrying the per-arm posterior.