kumulant

ThompsonTreePosterior

data class ThompsonTreePosterior(val priorWeight: Double = 1.0, val priorVariance: Double = 1.0) : TreePosterior(source)

Thompson sampling over the leaf's Normal-Gamma posterior. Given the leaf's pseudo- count n, sample mean m, and sample variance v, draws are mu ~ N(m, exploration * v / max(n, 1)); the posterior on the leaf mean assuming a Normal-Gamma conjugate with weak prior. exploration = 0.0 collapses to the leaf mean.

Constructors

Link copied to clipboard
constructor(priorWeight: Double = 1.0, priorVariance: Double = 1.0)

Properties

Link copied to clipboard

Prior variance applied when the leaf has effectively no signal.

Link copied to clipboard

Pseudo-count added to the leaf's totalWeights to avoid divide-by-zero on empty leaves.

Functions

Link copied to clipboard
open override fun evaluate(snapshot: TreeRegressionResult, x: VectorView, rng: Random, exploration: Double = 1.0): Double

Score a query point x under the regression snapshot. exploration controls the posterior-variance scale (Thompson) or the UCB width (LinUcb-style); 0.0 collapses to the point estimate.

ThompsonTreePosterior

constructor(priorWeight: Double = 1.0, priorVariance: Double = 1.0)(source)

evaluate

open override fun evaluate(snapshot: TreeRegressionResult, x: VectorView, rng: Random, exploration: Double = 1.0): Double(source)

Score a query point x under the regression snapshot. exploration controls the posterior-variance scale (Thompson) or the UCB width (LinUcb-style); 0.0 collapses to the point estimate.

priorVariance

Prior variance applied when the leaf has effectively no signal.

priorWeight

Pseudo-count added to the leaf's totalWeights to avoid divide-by-zero on empty leaves.