kumulant

TreePosterior

RegressionTree-aware scorer: routes the query x to a leaf snapshot and turns its weighted- variance summary into a single Double. Parallels the linear-side com.eignex.kumulant.stat.regression.glm.LinearPosterior family for the tree regressor shape.

Concrete posteriors differ only in how they consume the leaf's (mean, variance, totalWeights) triplet:

  • MeanTreePosterior: deterministic leaf mean.

  • ThompsonTreePosterior: Normal-Gamma draw built from the leaf's first two moments; the natural Thompson scheme when leaves accumulate normal-like rewards.

  • UcbTreePosterior: UCB-style mean + alpha * sqrt(variance / totalWeights) on the leaf's sampling-distribution-of-the-mean.

Inheritors

Functions

Link copied to clipboard
abstract 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.