gtm_rspg

Log-likelihood and component responsibilities over a Gaussian mixture

The responsibilities are returned via the global variable matrix gtmGlobalR. The responsibility gtmGlobalR(k,n) is the probability of a particular component in the Gaussian mixture, k, having generated a particular data point, n. It is calculated from the distances between the data point n and the centres of the mixture components, 1..K, and the inverse variance, beta, common to all components.

Synopsis

llh = gtm_rspg(beta, D, mode)
llh = gtm_rspg(beta, D)

Arguments

beta - a scalar value of the inverse variance common to all components of the mixture.

D - dimensionality of space where the data and the Gaussian mixture lives; necessary to calculate the correct log-likelihood.

mode - optional argument used to control the mode of calculation; it can be set to 0, 1 or 2 corresponding to increasingly elaborate measure taken to reduce the amount of numerical errors; mode = 0 will be fast but less accurate, mode = 2 will be slow but more accurate; the default mode is 0

Return

llh - the log-likelihood of data under a the Gaussian mixture.

Global variables

gtmGlobalR - an K-by-N responsibility matrix; gtmGlobalR(k,n) is the responsa- bility takened by mixture component k for data point n.

gtmGlobalDIST - an K-by-N matrix in which element (k,n) is the Euclidean distance between the centre of component m and the data point n.

gtmGlobalMinDist, gtmGlobalMaxDist - vectors containing the minimum and maximum of each column in DIST, respectively; 1-by-N; required iff m > 0.

See also

gtm_resp, gtm_dstg, gtm_dist


The GTM Toolbox: Contents