Val Kalatsky kalatsky at gmail.com writes:
You'll need some patience to get non-zeros, especially for k=1e-5
In [84]: np.sum(np.random.gamma(1e-5,size=100)!=0.0)
Out[84]: 7259
that's less than 1%. For k=1e-4 it's ~7%
To clarify: the distribution is peaked at numbers
that are too small
I am trying to sample from a Dirichlet distribution, where some of the
shape parameters are very small. To do so, the algorithm samples each
component individually from a Gamma(k,1) distribution where k is the shape
parameter for that component of the Dirichlet. In principle, this should
always
You'll need some patience to get non-zeros, especially for k=1e-5
In [84]: np.sum(np.random.gamma(1e-5,size=100)!=0.0)
Out[84]: 7259
that's less than 1%. For k=1e-4 it's ~7%
Val
On Mon, May 28, 2012 at 10:33 PM, Uri Laserson uri.laser...@gmail.comwrote:
I am trying to sample from a