initialization: Initialization of latent variable assignments...

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/vbgmm.R

Description

Initialize latent varaibles based on the number of components. The function is run before the VB-EM iteration in vbgmm.

Usage

1
initialization(X, init)

Arguments

X

D x N numeric vector or matrix of observations

init

Based on the dimension, init is expected to be one of the followings: scalar: number of components; vector: intial class labels; matrix: initialize with a D x K matrix for D variables and K components.

Details

The function is expected to be used by vbgmm to initialize assignments of latent varaibles before VM-EM iterations.

Value

R

N by K matrix for N observations and K latent components (defined by init)

Author(s)

Yue Li

References

Mo Chen (2012). Matlab code for Variational Bayesian Inference for Gaussian Mixture Model. http://www.mathworks.com/matlabcentral/fileexchange/35362-variational-bayesian-inference-for-gaussian-mixture-model

See Also

vbgmm

Examples

1
tmp <- initialization(matrix(c(rnorm(100,mean=2), rnorm(100,mean=3)),nrow=1), init=2)

TargetScore documentation built on Nov. 8, 2020, 6:56 p.m.