-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
Demo symbolic-pymc on radon example in pymc4 #67
Comments
Looks like we need to update the TF and TFP dependencies in order to run that PyMC4 code alongside |
I've sketched out the boilerplate work for doing this in PyMC4 here. Looks like we only need to specify the graph manipulation in log space from here. |
This is super useful (and very cool). Why can't the transform we have already implemented for the PyMC3 example be re-used here? Also, it highlights that we need a mechanism to switch out the logp function of a model object. |
I've updated it to include an actual transform. It's probably not the exact one to finish the job, but it shows everything in action. |
FYI: This makes for a great example of how sample space graphs are much more efficient for certain optimizations/transformations/reformulations/etc. I'll add an explanation as I keep updating the gist for this issue. |
The Gist has been updated to reflect a working "measure-space" (i.e. log-likelihood) transformation implemented in Nevertheless, it demonstrates all the mechanics needed to do real work with Before (from the PyMC4 Notebook)After |
I've moved this example to a more readable format here. The write-up still needs a bit of work (e.g. a better initial sampling point, miniKanren goal explanations), and the transform itself needs to use the full form of a normal log-likelihood to "correctly" handle the scale part of the rewriting (i.e. removal of the additive |
This model is non-centered: https://github.com/pymc-devs/pymc4/blob/7b144fa5be8b3b3f7e5ea9e9f3222988ab60a87f/notebooks/radon_hierarchical.ipynb
Would be great to see symbolic-pymc applied on this example to sample it in centered way.
The text was updated successfully, but these errors were encountered: