Companion
Functions
fitPopulationPrior
fun fitPopulationPrior(snapshots: List<CovarianceRegressionResult>, weight: (CovarianceRegressionResult) -> Double = { it.totalWeights.coerceAtLeast(1.0) }): PopulationPrior(source)
Empirical-Bayes population prior from a set of per-instance posteriors that share the same feature layout. Decomposes total variance into within-instance (mean of per-instance covariances) plus between-instance (covariance of per-instance means):
mu_pop = weighted_mean(snapshot_i.weights)
Sigma_pop = mean(snapshot_i.covariance)
+ weighted_cov(snapshot_i.weights, mu_pop)Content copied to clipboard
Weighting per snapshot is snapshot.totalWeights by default (more data = tighter contribution); pass an explicit weight selector to override (e.g. uniform weighting, or weighting by step). Empty input throws.