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

Integrate with PyMC3? #1

Open
twiecki opened this issue Sep 15, 2015 · 2 comments
Open

Integrate with PyMC3? #1

twiecki opened this issue Sep 15, 2015 · 2 comments

Comments

@twiecki
Copy link

twiecki commented Sep 15, 2015

This looks really neat. What do you think of adding this sampler to pymc3 where it would be directly usable in a probabilistic programming framework?

It's pretty easy to add new samplers, for example: https://github.com/pymc-devs/pymc3/blob/master/pymc3/step_methods/nuts.py#L14

@rueberger
Copy link
Owner

Yes, we've been planning to integrate with pymc3!

Has there been any progress towards multiple particle support in pymc3 since this issue?

Although we intend to integrate anyway, there is a payoff in terms of overall computational cost for using multiple particles. In theory the computational cost of running one particle for 100 epochs or 100 particles for one should be the same. However, running multiple particles allows use of matrix math. Perhaps Theano makes this a non-issue.

@twiecki
Copy link
Author

twiecki commented Sep 16, 2015

That's great!

Not much happened to multiple particle support yet. The issue to solve is how to save them in a trace (we do have a MultiTrace that can do this) and access them, so perhaps it's better to keep an internal trace in the sampler itself. I suppose you solve this problem already here?

I think the first version can just loop over all particles in the internal trace. Once we have that it's easy to place this into a theano.map call where it could be parallelized e.g. by GPU.

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

2 participants