[SciPy-User] scipy.stats: Sampling from an arbitrary probability distribution
nicky van foreest
Mon Jun 4 15:07:11 CDT 2012
Maybe this article is of help
On Jun 4, 2012 3:22 PM, "Sturla Molden" <email@example.com> wrote:
> On 03.06.2012 13:20, Daniel Sabinasz wrote:
> > Hi all,
> > I need to sample a random number from a distribution whose probability
> > density function I specify myself. Is that possible using scipy.stats?
> Sampling a general distribution is typically an MCMC problem, that e.g.
> can be solved with the Metropolis-Hastings sampler.
> Because of its recursive nature, a Markov chain like this is better
> written in Cython, or you can use NumPy to run multiple chains in
> parallel. (I depends on how many samples you need, of course, anything
> below a million should be fast enough in Python.)
> You might also take a look at PyMCMC:
> SciPy-User mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SciPy-User