LinearPosterior
Stateless multivariate sampler over a LinearRegressionResult snapshot. Reads the weights (and whichever uncertainty fields the concrete snapshot carries) and returns a fresh weight-vector draw, scaled by exploration so callers can dial the posterior variance per round.
Lives next to the regression results because Thompson sampling is one of several ways to consume the posterior; Bayesian optimisation will combine these samplers with acquisition functions (UCB, EI, PI) reading the same snapshots. The univariate-bandit com.eignex.kumulant.bandit.univariate.Posterior family is a sibling but disjoint: different result shape, different math.
Sealed + @Serializable so a (regression, posterior) configuration is wire portable via skema's polymorphic discriminator.
Inheritors
Functions
evaluate
Score a query point x under a fresh posterior draw. Parallels com.eignex.kumulant.bandit.univariate.BanditPolicy.evaluate for the multivariate setting: an outer "pick the best x" loop calls this once per candidate.
Default is invMean(bias + (x dot sample(...))). Concrete subtypes may override with a specialised formula (e.g. drawing only xT * Sigma * x worth of variance instead of the full weight vector).
The draw is uncertainty over the coefficients, which live in the linear-predictor space, so the noise is added before the inverse link, never after: a score has to come back on the same scale as the reward being maximised.