[SciPy-User] rejection sampling
Mon Aug 8 02:42:55 CDT 2011
I got started a bit with rejection sampling.
for example scipy.stats.rdist has a very slow random number generator.
for shape parameters>=2 and not very large, rejection sampling works
much faster. (for shape parameter <2, the pdf of rdist is unbound and
rejection sampling against uniform doesn't work)
attached is just the first version to show that it works.
Does someone already have a more complete version that could be shared?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1381 bytes
Desc: not available
Url : http://mail.scipy.org/pipermail/scipy-user/attachments/20110808/1292f5e2/attachment.py
More information about the SciPy-User