Copyright (C) 2011, ATR All Rights Reserved. License : New BSD License(see VBMEG_LICENSE.txt)
0001 function py = vb_gamma_dist_prob(x,y,A) 0002 % 0003 % Copyright (C) 2011, ATR All Rights Reserved. 0004 % License : New BSD License(see VBMEG_LICENSE.txt) 0005 0006 % log(y) = a*x + b*log(x) + c 0007 0008 ix = find( y > max(y)*0.1); 0009 0010 py = exp( A(1)*x + A(2)*log(x) ); 0011 0012 % y = C * py 0013 0014 C = sum(y(ix).*py(ix)) / sum(py(ix).^2); 0015 0016 py = C * py;