kumulant

MultivariateGaussian

@Serializable
@SerialName(value = "MultivariateGaussian")
data object MultivariateGaussian : LinearPosterior<PrecisionRegressionResult> (source)

Full multivariate-Gaussian draw w ~ N(weights, exploration * Sigma) from the precision factor L carried in the snapshot:

w = weights + sqrt(exploration) * L^-T * u where u ~ N(0, I).

L^-T is a square root of Sigma because L^-T * (L^-T)T = (L * LT)^-1, so the draw costs one back substitution: O(n^2), and no decomposition at draw time.

Functions

evaluate

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

Closes to invMean(eta(x) + sqrt(exploration) * ||L^-1 x|| * N(0,1)); one triangular solve instead of sampling the full weight vector.

sample

open override fun sample(snapshot: PrecisionRegressionResult, rng: Random, exploration: Double = 1.0): Vector(source)

Draw a weight vector from the posterior at exploration variance scale. exploration = 0.0 collapses to the point estimate; 1.0 is the calibrated posterior.