-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Building a model that requires external function in pymc3? #377
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
Comments
Yeah, this is something we have to fix. Unfortunately if your likelihood is a blackbox function there is no way to compute the gradient and you can't run HMC. |
Closing this in favor of #507. |
I'm interested to know this answer to this post as well, but the links posted above don't exist anymore. |
@docyyz You can see here: http://docs.pymc.io/notebooks/getting_started.html#Arbitrary-deterministics or ask questions here: https://discourse.pymc.io/ |
Hello,
I have been anxiously awaiting HMC functionality in pymc3; thanks for all the work everyone has put in.
I am attempting to make a model in pymc3 which requires one of the free parameters of my model to be operated on by an external python package. For instance, one of my 'free' parameters is an unknown parameter of the cosmology of the universe, and a set of integrals needs to be performed on this parameter in order to estimate an observable quantity.
Perhaps I just don't understand what's going on in pymc3, but I can't figure out how to do this since pm.Uniform returns a Theano TensorVariable. The basic structure of what I'm trying to do looks like:
The cosmology_calculator step immediately wants the input to be a float, which crashes because it's a Tensor.
Is there any way to construct a model in pymc3 that can do this?
The text was updated successfully, but these errors were encountered: