Open Shimuuar opened 10 years ago
There's post about algorithm for generation of Poisson random variates. Algorithm is noce and simple but requires dependency on math-functions
(it needs logFactorial
).
http://www.johndcook.com/blog/2010/06/14/generating-poisson-random-values/
I am trying to figure out whether the issue I have is related. My system is using many GB (I last stopped it at 25 GB!) of memory to do something that perhaps ought to be simple:
> withSystemRandom . asGenIO . sample $ poisson 10000
I guess this is from the table generation. Is this expected given the current setup?
Yes. It's problem with condensed tables. See #59
Thank you! Although I don't think I'll have time anytime soon
Currently library allows to generate Poisson and binomial random variate using condensed tables algorithm. It is very fast but require building lookup table which is costly. It makes this algorithm unsuitable for cases when only few samples for given parameters are required. For examples when parameters are random variables themselves