wolffd@0: function prob = gmmprob(mix, x) wolffd@0: %GMMPROB Computes the data probability for a Gaussian mixture model. wolffd@0: % wolffd@0: % Description wolffd@0: % This function computes the unconditional data density P(X) for a wolffd@0: % Gaussian mixture model. The data structure MIX defines the mixture wolffd@0: % model, while the matrix X contains the data vectors. Each row of X wolffd@0: % represents a single vector. wolffd@0: % wolffd@0: % See also wolffd@0: % GMM, GMMPOST, GMMACTIV wolffd@0: % wolffd@0: wolffd@0: % Copyright (c) Ian T Nabney (1996-2001) wolffd@0: wolffd@0: % Check that inputs are consistent wolffd@0: errstring = consist(mix, 'gmm', x); wolffd@0: if ~isempty(errstring) wolffd@0: error(errstring); wolffd@0: end wolffd@0: wolffd@0: % Compute activations wolffd@0: a = gmmactiv(mix, x); wolffd@0: wolffd@0: % Form dot product with priors wolffd@0: prob = a * (mix.priors)';