Woolz Image Processing
Version 1.8.3
|
Files | |
file | AlgMixture.c |
Provides a function for computing the maximum liklihood parameters of a mixture of distributions which fit the given data. | |
Functions | |
AlgError | AlgMixtureMLG (int nDbn, int nCls, double samOrg, double samItv, double *freq, double *alpha, double *mu, double *sd, double tol, double sumFreq, double *dstLL, int *dstNItn) |
Computes the maximum liklihood estimate of the parameters of a mixture of normal distributions which best fit the give frequencies. These parameters are the miximg proportions, means, and standard deviations. The log-liklihood and the number of iterations are also computed. This algorithm is based on the article: Agha M. and Ibrahim M.T. Maximum Liklihood Estimation of Mixtures of Distributions AS203 Applied Statistics 33(3):327-332, 1984. More... | |
AlgError | AlgMixtureSyn (int nCls, int *synFreq, int nObv, double synOrg, double synStep, int nDbn, double *alpha, double *mu, double *sigma) |
Synthesise a mixture of normal distributions. More... | |
AlgError AlgMixtureMLG | ( | int | nDbn, |
int | nCls, | ||
double | samOrg, | ||
double | samItv, | ||
double * | freq, | ||
double * | alpha, | ||
double * | mu, | ||
double * | sd, | ||
double | tol, | ||
double | sumFreq, | ||
double * | dstLL, | ||
int * | dstNItn | ||
) |
Computes the maximum liklihood estimate of the parameters of a mixture of normal distributions which best fit the give frequencies. These parameters are the miximg proportions, means, and standard deviations. The log-liklihood and the number of iterations are also computed. This algorithm is based on the article: Agha M. and Ibrahim M.T. Maximum Liklihood Estimation of Mixtures of Distributions AS203 Applied Statistics 33(3):327-332, 1984.
nDbn | Number of distributions in the mixture. |
nCls | Number of classes in the frequency distribution. |
samOrg | Position of first sample (origin). |
samItv | Sample interval. |
freq | Given frequency samples. |
alpha | Estimates of nDbn alpha values, both given and returned. Alpha values must be in the range (0,1]. |
mu | Estimates of nDbn mean values, both given and returned. |
sd | Estimates of nDbn standard deviation values, both given and returned. |
tol | Difference between two consecutive log liklihood values required to terminate iteration. |
sumFreq | Number of observations. |
dstLL | Destination pointer for the log liklihood. |
dstNItn | Destination pointer for the number of iterations taken. |
References ALC_ER_NONE, AlcDouble2Free(), AlcDouble2Malloc(), AlcFree(), AlcMalloc(), ALG_ERR_CONVERGENCE, ALG_ERR_FUNC, ALG_ERR_MALLOC, and ALG_ERR_NONE.
AlgError AlgMixtureSyn | ( | int | nCls, |
int * | synFreq, | ||
int | nObv, | ||
double | synOrg, | ||
double | synStep, | ||
int | nDbn, | ||
double * | alpha, | ||
double * | mu, | ||
double * | sigma | ||
) |
Synthesise a mixture of normal distributions.
nCls | Number of classes in the frequency distribution. |
synFreq | Buffer for synthesised frequencies. |
nObv | Number of observations. |
synOrg | Origin of synFreq buffer. |
synStep | Sample interval for the synFreq buffer. |
nDbn | Number of distributions in the mixture. |
alpha | Estimates of nDbn alpha values. |
mu | Estimates of nDbn mu values. |
sigma | Estimates of nDbn standard deviation values. |
References ALG_ERR_FUNC, ALG_ERR_NONE, and ALG_NINT.