Code covered by the BSD License  

Highlights from
Variational Bayesian Inference for Gaussian Mixture Model

image thumbnail

Variational Bayesian Inference for Gaussian Mixture Model

by

 

Variational Bayes method (mean field) for GMM can auto determine the number of components

logmvgamma(x,d)
function y = logmvgamma(x,d)
% Compute logarithm multivariate Gamma function.
% Gamma_p(x) = pi^(p(p-1)/4) prod_(j=1)^p Gamma(x+(1-j)/2)
% log Gamma_p(x) = p(p-1)/4 log pi + sum_(j=1)^p log Gamma(x+(1-j)/2)
% Written by Michael Chen (sth4nth@gmail.com).
s = size(x);
x = reshape(x,1,prod(s));
x = bsxfun(@plus,repmat(x,d,1),(1-(1:d)')/2);
y = d*(d-1)/4*log(pi)+sum(gammaln(x),1);
y = reshape(y,s);

Contact us