junlulocky / ARS-MCMC

Python information for Adaptive Rejection Sampling (ARS)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ARS

Python implementation of Adaptive Rejection Sampling

Result

See ./example.py for the test, and ./ars.py for the algorithm implementation

for Beta(1.5,1)

image

for Gamma(shape=2, scale=0.5)

image

Normal(0,1)

image

References

[1]. Gilks, Walter R., and Pascal Wild. "Adaptive rejection sampling for Gibbs sampling." Applied Statistics (1992): 337-348.

[2]. Wild, Pascal, and W. R. Gilks. "Algorithm AS 287: Adaptive rejection sampling from log-concave density functions." Journal of the Royal Statistical Society. Series C (Applied Statistics) 42.4 (1993): 701-709.

About

Python information for Adaptive Rejection Sampling (ARS)


Languages

Language:Python 100.0%