Thursday, February 02, 2017

Symmetric Dirichlet in d dimensions

function res=dirchrnd(alpha,d)
res = zeros(d,1);
for i=1:d
res(i)=gamrnd(alpha,1);
end
res=res/sum(res);
end

No comments:

AI

Despite the benefits of AI we are starving for humanity.