Flattens a list of Gaussian mixtures into a single mixture whose density is the weighted average \(\sum_b \alpha_b\, g_b(x)\) – model averaging, prior pooling, or the mixture-of-mixtures construction.
Value
A gmm with sum(K_b) components.
See also
Other operators:
gmm_affine(),
gmm_aggregate(),
gmm_convolve(),
gmm_counterfactual(),
gmm_filter(),
gmm_intervene(),
gmm_missing(),
gmm_observe(),
gmm_product(),
gmm_reduce()
Examples
g1 <- gmm(weights = 1, means = list(-1), covariances = list(matrix(1)))
g2 <- gmm(weights = 1, means = list(2), covariances = list(matrix(0.5)))
gmm_mix(list(g1, g2), weights = c(0.7, 0.3))
#> <mix[2]>: K = 2 components in p = 1 dimensions
#> [1] w = 0.7000, |mu| = 1.0000, tr(Sigma) = 1.0000
#> [2] w = 0.3000, |mu| = 2.0000, tr(Sigma) = 0.5000