pyro-ppl / pyro

Deep universal probabilistic programming with Python and PyTorch
http://pyro.ai
Apache License 2.0
8.51k stars 984 forks source link

Implementation of Gibbs sampling for MCMC #1772

Open varenick opened 5 years ago

varenick commented 5 years ago

According to https://github.com/pyro-ppl/pyro/issues/1093 Gibbs sampling is still not implemented in pyro. Can I try it?

fritzo commented 5 years ago

Sure, give it a try. Do you have a motivating example model in mind? There are many possible ways to implement Gibbs sampling in Pyro; to help guide design decisions it would help to focus on a single model class, e.g. restricted Boltzmann machines since they're nicely tensorizable. Maybe there's a way to wrap a generic block Gibbs sampler for use in Pyro.

fritzo commented 5 years ago

@varenick if you do decide to work on this task, I'd suggest writing up a brief design doc before starting to code. There are lots of design decisions to make here, and it's worth discussing where to fit this in. Here are some examples of some previous (longer) design docs.

varenick commented 5 years ago

@fritzo Thank you for your helpful comments! It seems like, I do not plan to start to work on this issue right now. Anyway, at first I have to think about design choices as you suggest.

ruoshiwen commented 4 years ago

@fritzo @varenick Hello. Do you have any updates on Gibbs sampling implementation? I am also considering implementing this now.

fritzo commented 4 years ago

Hi @ruoshiwen, I believe there has been no new work. Do you have an example model or class of models that you are targeting? As above, I think it would be good to start with a little design doc. I'm also happy to discuss over zoom.

ruoshiwen commented 4 years ago

Hi, thanks for your immediate reply. @fritzo I am working on a HDP-HMM with infinite mixtures under each hidden state ( Rao-Blackwellized Gibbs sampler) The thing is I am still new to pyro which I started learning pyro three months ago. But I do hope I can contribute a bit.