BayesianLogic / blog

The BLOG programming language
http://bayesianlogic.github.io/
BSD 4-Clause "Original" or "Old" License
98 stars 31 forks source link

Binomial Distribution sampling #78

Open WilliamCushing opened 10 years ago

WilliamCushing commented 10 years ago

Efficient techniques for generating binomial variates exist: http://delivery.acm.org/10.1145/50000/42381/p216-kachitvichyanukul.pdf?ip=128.32.46.192&id=42381&acc=ACTIVE%20SERVICE&key=CA367851C7E3CE77.3158474DDFAA3F10.4D4702B0C3E38B35.4D4702B0C3E38B35&CFID=328804659&CFTOKEN=39072998&__acm__=1398821672_e0569d312aa40e219748c14a4d8610d2

This paper should be studied, and in particular BTPE should be implemented, because it best fits the needs of BLOG concerning binomial variate generation.

lileicc commented 10 years ago

@WilliamCushing The link doesnot work.

WilliamCushing commented 10 years ago

http://dl.acm.org/citation.cfm?doid=42372.42381

yberol commented 10 years ago

@WilliamCushing for an existing C implementation check: https://github.com/ampl/gsl/blob/master/randist/binomial_tpe.c

It is a very intricate code though.