Trainable mapping, mixture of Gaussians (MoG) density estimate
W = GAUSSM(A,K,R,S,M)
Estimation of a PDF by the dataset A by a mixture of Gaussians procedure. Use is made of EMCLUST(A,QDC,K). Unlabeled objects are neglected, unless A is entirely unlabeled or double. Then all objects are used. If A is a multi-class crisp labeled dataset the densities are estimated class by class and then weighted and combined according their prior probabilities. Use +A instead of A to obtain a single set of Gaussians. In all cases, just single density estimator W is returned.
Note that it is necessary to set the label type of A to soft labels (A = LABTYPE(A,'soft') in order to use the traditional EM algorithm based on posterior probabilities instead of using crisp labels.
The mapping W may be applied to a new dataset B using DENSITY = B*W.
W = A*GAUSSM
uses a single Gaussian per class (K=1) and no regularisation. If regulariisation is desired, also K should be supplied.
a = gendatb;