annotate toolboxes/FullBNT-1.0.7/netlab3.3/gmmprob.m @ 0:e9a9cd732c1e tip

first hg version after svn
author wolffd
date Tue, 10 Feb 2015 15:05:51 +0000
parents
children
rev   line source
wolffd@0 1 function prob = gmmprob(mix, x)
wolffd@0 2 %GMMPROB Computes the data probability for a Gaussian mixture model.
wolffd@0 3 %
wolffd@0 4 % Description
wolffd@0 5 % This function computes the unconditional data density P(X) for a
wolffd@0 6 % Gaussian mixture model. The data structure MIX defines the mixture
wolffd@0 7 % model, while the matrix X contains the data vectors. Each row of X
wolffd@0 8 % represents a single vector.
wolffd@0 9 %
wolffd@0 10 % See also
wolffd@0 11 % GMM, GMMPOST, GMMACTIV
wolffd@0 12 %
wolffd@0 13
wolffd@0 14 % Copyright (c) Ian T Nabney (1996-2001)
wolffd@0 15
wolffd@0 16 % Check that inputs are consistent
wolffd@0 17 errstring = consist(mix, 'gmm', x);
wolffd@0 18 if ~isempty(errstring)
wolffd@0 19 error(errstring);
wolffd@0 20 end
wolffd@0 21
wolffd@0 22 % Compute activations
wolffd@0 23 a = gmmactiv(mix, x);
wolffd@0 24
wolffd@0 25 % Form dot product with priors
wolffd@0 26 prob = a * (mix.priors)';