Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Combine powers with PYMC 3? #140

Closed
datnamer opened this issue Nov 21, 2014 · 10 comments
Closed

Combine powers with PYMC 3? #140

datnamer opened this issue Nov 21, 2014 · 10 comments

Comments

@datnamer
Copy link

Both Emcee and PYMC are amazing packages with differing but somewhat overlapping utility.

Any thought of combining the two, ala: http://twiecki.github.io/blog/2013/09/23/emcee-pymc/

Would provide great synergy for bayesian analysis in python while reducing package fragmentation and perhaps be a boon to both packages.

@bobcolner
Copy link

+10,000

As a bayesian noob the pymc API is much more approachable. It would be a huge win to embed the emcee sampler in PyMC!

@twiecki
Copy link

twiecki commented Nov 23, 2014

+1 :)

@dfm
Copy link
Owner

dfm commented Nov 23, 2014

Oh hai @twiecki... weren't you going to do that?? ;-)

@twiecki
Copy link

twiecki commented Nov 23, 2014

Well, I sorta already did ;). I'd be happy to help but probably more advising than taking the lead. I don't think it should be too hard. Mainly we need something with the same interface as the ArrayStep: https://github.com/pymc-devs/pymc/blob/master/pymc/step_methods/arraystep.py#L13

Someone interested?

@twiecki
Copy link

twiecki commented Nov 24, 2014

Do moves have to be proposed serially or can that part be parallelized? If I remember correctly it's serial (but groups of walkers can be split up).

@ipashchenko
Copy link
Contributor

One half of walkers propose positions for other half using it's parameters and parameters of the others + some random numbers (from some specified distribution). That's the idea i suppose:)

@twiecki
Copy link

twiecki commented Nov 24, 2014

Ah, neat. So this could be sped up significantly by testing the proposals on the GPU (which pymc3 supports).

@ipashchenko
Copy link
Contributor

I think the most heavy part it the lnprob (posterior) calculation for each walker - that is where GPU could greatly help. Now, EnsembleSampler has interface - pool object that is passed to it's constructor. It can be any object with a map method that follows the same calling sequence as the built-in map function (from docs). Proposal calculation itself is fast thanks to numpy.

@twiecki
Copy link

twiecki commented Apr 17, 2017

FYI: pymc-devs/pymc#1689

@dfm
Copy link
Owner

dfm commented Apr 17, 2017

Thanks @twiecki

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants