mcx icon indicating copy to clipboard operation
mcx copied to clipboard

Call for use cases and examples

Open rlouf opened this issue 5 years ago • 7 comments

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.

rlouf avatar Feb 11 '20 11:02 rlouf

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.)

rlouf avatar Apr 02 '20 08:04 rlouf

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.

miretchin avatar Aug 03 '20 22:08 miretchin

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.

rlouf avatar Sep 15 '20 14:09 rlouf

Hi @rlouf , if I wanted to start implementing the Statistical Rethinking examples in mcx, should I go with master branch? Or the compiler-refactor?

elanmart avatar Feb 20 '21 11:02 elanmart

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 avatar Feb 20 '21 13:02 rlouf

@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

elanmart avatar Feb 22 '21 00:02 elanmart

Nice! Let me know if you bump into an issue with MCX, something not working or missing.

rlouf avatar Feb 22 '21 08:02 rlouf