Description Usage Arguments Value Examples
Compute belongings, which is useful in clustering EM algorithm (E-step)
1 | compute_belongings(model, X, ...)
|
model |
object of class |
X |
data matrix |
... |
arguments passed to |
the Z matrix (n-by-g)
1 2 3 4 5 6 | gm1 <- gaussian_mdl(c(1, 2), matrix(c(1, 0, 0, 2), 2, 2))
gm2 <- gaussian_mdl(c(-5, -3), matrix(c(2, -1, -1, 1), 2, 2))
gm3 <- gaussian_mdl(c(0, 0), matrix(c(1, 0.3, 0.3, 1), 2, 2))
gmm <- mixture_mdl(c(0.3, 0.2, 0.5), list(gm1, gm2, gm3))
X <- generate_data(gmm, 1000)
Z <- compute_belongings(gmm, X)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.