gmm_fit_em {MixtureFitting} | R Documentation |
Estimate Gaussian Mixture parameters using Expectation Maximization.
Description
Estimates parameters for Gaussian mixture using Expectation Maximization algorithm.
Usage
gmm_fit_em( x, p, w = numeric(), epsilon = c( 0.000001, 0.000001, 0.000001 ),
debug = FALSE, implementation = "C", ... )
Arguments
x |
data vector |
p |
initialization vector of 3*n parameters, where n is number of mixture components. Structure of p vector is p = c( A1, A2, ..., An, mu1, mu2, ..., mun, sigma1, sigma2, ..., sigman ), where Ai is the proportion of i-th component, mui is the center of i-th component and sigmai is the scale of i-th component. |
w |
weights of data points, must have the same length as the data vector; if not given or has different length, equal weights are assumed. |
epsilon |
tolerance threshold for convergence. Structure of epsilon is epsilon = c( epsilon_A, epsilon_mu, epsilon_sigma ), where epsilon_A is threshold for component proportions, epsilon_mu is threshold for component centers and epsilon_sigma is threshold for component scales. |
debug |
flag to turn the debug prints on/off. |
implementation |
flag to switch between C (default) and R implementations. |
... |
additional arguments passed to gmm_fit_em_R() when R implementation is used. |
Value
Vector of mixture parameters, whose structure is the same as of input parameter's p.
Author(s)
Andrius Merkys