rlouf / mcx

Express & compile probabilistic programs for performant inference on CPU & GPU. Powered by JAX.
https://rlouf.github.io/mcx
Apache License 2.0
325 stars 17 forks source link

Fix/Updates to Gamma and Poisson Distributions #91

Closed mkretsch327 closed 3 years ago

mkretsch327 commented 3 years ago

Was experimenting with a small Gamma-Poisson model, and found some things to update. Added some additional tests too. Look forward to hearing feedback!

rlouf commented 3 years ago

Thank you for helping with this, so many distributions to implement! If you have time, would you mind implementing shape tests for the Gamma distribution? It is critical in PPLs (c.f. PyMC3 and its shape issues); it is useful in joint and predictive sampling, but also for inference since the initial state is obtained by sampling from the joint distribution.

rlouf commented 3 years ago

I see that you added tests for the sampling shape, thank you! Is it good to merge on your end?

mkretsch327 commented 3 years ago

Hey @rlouf apologies for the delay, good on my end !

rlouf commented 3 years ago

Looks good to me, thank you for contributing!