ocmath_para_gaussmix
Description
Estimate parameters for Gaussian Mixture distribution
Syntax
int ocmath_para_gaussmix(int iSize, const double * pData, double * pPara, int * pnG, GaussMixVar nVar, bool bOpt, int riter, double * pAD = NULL, double * pBIC = NULL, int nPercents = 0, const double * pPercents = NULL, double * pXp = NULL, double * pPval = NULL, bool bMC = false)
Parameters
- iSize
- [input]input data size
- pData
- [input]input data
- pPara
- [output]weight, mean, standard deviation for each component in the mixture
- pnG
- [input/output]number of groups
- nVar
- [input]
enum GaussMixVar
{
var_Group = 0,
var_Pooled = 1,
var_GroupDiag = 2,
var_PooledDiag = 3,
var_Overall = 4,
};
- bOpt
- [input]true to find the best number of components, ng: the maximum number of components; false to use the specified number of components ng
- riter
- [input]membership probabilities are rounded to 0 or 1 after every riter iterations, -1 means not rounded
- pAD
- [output]Anderson-Darling statistic
- pBIC
- [output]BIC
- nPercents
- [input]number of Percents
- pPercents
- [input] Percents
- pXp
- [output]XP
- pPval
- [output]P-value
- bMC
- [input]true to calculate AD and Pval by Monte Carlo
Return
return 0 on successful exit; if an error or warning has been detected, then it returns the specific error or warning code.
Examples
Remark
See Also
header to Include
origin.h
Reference
|