mackelab / delfi

Density estimation likelihood-free inference. No longer actively developed see https://github.com/mackelab/sbi instead
http://www.mackelab.org/delfi
Other
71 stars 28 forks source link

add poisson distribution univariate #62

Closed janfb closed 4 years ago

janfb commented 4 years ago

note that in line 53

x = self._poisson.rvs(random_state=self.rng, size=(n_samples, self.ndim))

I use self._poisson which is the scipy Poisson, and not the self.rng.poisson (as in delfi/distribution/Gamma.py) which would be numpy. For seeding I pass self.rngas the random_state.

dgreenberg commented 4 years ago

Your test is failing because you're not importing your new distribution in delfi/distribution/init.py

janfb commented 4 years ago

thanks for the comments. tests are passing now.