mcx
mcx copied to clipboard
Call for use cases and examples
Examples
ˋmcx` is only interesting if it can be used and we need more example to showcase the way the library can be used. Examples are a great way to get acquainted with the library and make a first contribution.
We are particularly looking for examples that use:
- Batching (vectorized sampling) on CPU, GPU or TPU;
- Sequential inference;
Use cases
If there is a use case for which you would consider using mcx
but cannot because something is missing, let us know in the comments.
Some ideas:
- [ ] Eight schools
- [ ] Radon
- [ ] Baseball
- [ ] Stochastic volatility model
- [ ] Example of dynamic stopping rule (Rhat, ESS)
- [ ] A/B testing with sequential data input
- [ ] Gaussian mixture
- [ ] Bayesian methods for hackers
- [ ] SIR model: ode or not, gaussian process prior on R0
- [ ] Statistical Rethinking
- [ ] Stochastic Block model
- [ ] Poisson Matrix factorization
- [ ] https://twitter.com/gkossakowski/status/1257781567684071424?s=21
- [ ] Any example of spatial analysis
- [ ] All examples in “introduction to probabilistic programming”
- [ ] https://florianwilhelm.info/2020/10/bayesian_hierarchical_modelling_at_scale/
- [ ] Sequencing rules of bird songs (if we can get the data): https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0024516#s4
- [ ] GARCH model with regime switchpoint
In terms of practical examples:
- [ ] Bayesian workflow
- [ ] How to use
mcx
in a production environment (getting logs, faster inference w/o progress bars, list of exceptions raised and their meaning, etc.)
Statistical rethinking examples would be really great to have! Some of the chapters won't yet be possible because it looks like the required distributions are missing, particularly the discrete distributions Beta Binomial, Gamma Poisson, Zero-Inflated Poisson (or zero-inflated negative binomial), and Ordered Logit / Probit.
Indeed! I will bump the implementation of discrete distributions so that the first release contains enough functionalities to implement most of the examples from Statistical Rethinking.
Hi @rlouf , if I wanted to start implementing the Statistical Rethinking examples in mcx
, should I go with master
branch? Or the compiler-refactor
?
Awesome! compiler-refactor
is the branch with the most recent version of the API. By the time you finish it should be merged :)
I started here but there's almost nothing: https://github.com/mcx-ppl/statistical-rethinking-mcx. Note that the sample
method of distributions returns a 1-dimension array for now, but will soon be a float (PR on the way).
@rlouf thanks, I'm actually using the book as intro to bayesian methods, so I was planning to implement stuff myself anyway :)
I started with chapters 2 and 3 today (both are still WIP): https://github.com/elanmart/rethinking-2
Nice! Let me know if you bump into an issue with MCX, something not working or missing.