Companion
Functions
Link copied to clipboard
fun fitPopulationPrior(snapshots: List<CovarianceRegressionResult>, weight: (CovarianceRegressionResult) -> Double = { it.totalWeights.coerceAtLeast(1.0) }): PopulationPrior
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):
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)<br>Sigma_pop = mean(snapshot_i.covariance)<br> + 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.