Would be nice to implement this functionality in pymc3. Not only for evidence calculation, but for sampling multimodal densities as well. It works nice in emcee package and doesn't seem so hard to implement.
P.S. Thank you for your work!
I think parallel tempering/replica exchange will be a nice addition to the currently implemented samplers in PyMC3. I have plans to implement this sampler, but I don't have time right now. I think I could probably start working on this in 1 or 2 months. Of course, if someone else wants to work on this and has the time it will be ok for me.
@aloctavodia Although i don't know details of pymc3 implementation so far, but i think parallel tempering should work with any sampler/samplers combinations. Thus if some parameters are updated using MH step and others using Slice sampling - it should be possible to use parallel tempering for such scheme anyway. One needs somehow implement sampling each parameter in several chains (with different temperature each) and exchange information between chains with different temperatures. Does pymc3 API allow simple and hackless implementaion of PT as, for example, emcee?
:+1:
I think this is probably relatively straightforward. I'm not super sure what the best way to do the exchange of information between chains would be. You might need to have the step method handle the chains itself rather than having the sampling function do it, but that's pretty easy.
As far as I understand #1031 implements an improved version of the Parallel Tempering (AKA Replica Exchange) method. So probably this issue should be closed.
Thanks @aloctavodia
@aloctavodia: from my cursory reading it seems that TMCMC, a version of which seems to have been implemented in #1031, is actually different from Parallel Tempering / Replica Exchange. Are there any plans to implement Parallel Tempering in PyMC3 as suggested by @ipashchenko ?
Hi @simeoncarstens ypu get it right SMC is different from parallel tempering/replica exchange. There are no plans of implementing parallel tempering at this point. Personally I am more focused on improving SMC. Nevertheless, from a brief talk I had
this morning with @junpenglao, parallel tempering will be available in PyMC4 and it should be pretty efficient thanks to how TensorFlow and TensorFlow Probability work.
Should this issue be re-opened until the method is implemented?
I doubt it will be added to PyMC3 at this point, as we are encouraging new functionality to be implemented in PyMC4.
There is replica exchange sampler in TFP, we have a GSOC project this year to add more support of different sampler to PyMC4 so this would hopefully be available soon.
Most helpful comment
There is replica exchange sampler in TFP, we have a GSOC project this year to add more support of different sampler to PyMC4 so this would hopefully be available soon.