dswah / pyGAM

[HELP REQUESTED] Generalized Additive Models in Python
https://pygam.readthedocs.io
Apache License 2.0
862 stars 159 forks source link

Setting a seed for sample function #255

Open daniel-s-cunha opened 4 years ago

daniel-s-cunha commented 4 years ago

Some hierarchical modeling techniques require evaluating different statistics on the same sample of the posterior. Currently, there is no seed to set for the sample function.

daniel-s-cunha commented 4 years ago

I confirmed the code is using numpy for sampling. As a temporary fix, you can set np.random.seed(n) before running the sample function each time if you need the same samples.