Code covered by the BSD License  

Highlights from
MATLAB interface for L-BFGS-B

MATLAB interface for L-BFGS-B



Matlab interface to the L-BFGS-B nonlinear optimization algorithm

computelnZconst (nu, eta, D)
function lnZconst = computelnZconst (nu, eta, D)

  K = length(nu);   % The number of topics.
  W = length(eta);  % The size of the vocabulary.

  sumnu    = sum(nu);
  sumeta   = sum(eta);
  lnZconst = K*gammaln(sumeta) - K*sum(gammaln(eta)) ...
             + D*gammaln(sumnu) - D*sum(gammaln(nu));

Contact us