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

Move blackbox likelihoods to howto. Move samplers to samplers. #604

Merged
merged 4 commits into from
Nov 18, 2023

Conversation

twiecki
Copy link
Member

@twiecki twiecki commented Nov 17, 2023

Not sure what this is about:

Check no references that should be sphinx cross-references are urls...........................Failed
- hook id: no-references-as-links
- exit code: 1

examples/howto/blackbox_external_likelihood_numpy.ipynb:370:    "But, what if we don't know the analytical form. If our model/likelihood is purely Python and made up of standard maths operators and Numpy functions, then the [autograd](https://github.com/HIPS/autograd) module could potentially be used to find gradients (also, see [here](https://github.com/ActiveState/code/blob/master/recipes/Python/580610_Auto_differentiation/recipe-580610.py) for a nice Python example of automatic differentiation). But, if our model/likelihood truly is a \"black box\" then we can just use the good-old-fashioned [finite difference](https://en.wikipedia.org/wiki/Finite_difference) to find the gradients - this can be slow, especially if there are a large number of variables, or the model takes a long time to evaluate. Below, a function to find gradients has been defined that uses the finite difference (the central difference) - it uses an iterative method with successively smaller interval sizes to check that the gradient converges. But, you could do something far simpler and just use, for example, the SciPy [approx_fprime](https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.approx_fprime.html) function.\n"

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Copy link
Member

@OriolAbril OriolAbril left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be merged as is, but I noticed a couple issues that we should try to tackle at some point:

  • there are still several links to deeplearning.com from the old theano docs
  • there are now multiple broken references all around. Here for example I have noticed references to the cython notebook and the custom distribution one, which are gone

@twiecki
Copy link
Member Author

twiecki commented Nov 18, 2023

Cool, I'll merge and open an new issue.

@twiecki twiecki merged commit 8e67a67 into main Nov 18, 2023
2 checks passed
@twiecki twiecki deleted the more_restructure branch November 18, 2023 13:23
@twiecki
Copy link
Member Author

twiecki commented Nov 18, 2023

Issue: #605

alporter08 pushed a commit to alporter08/pymc-examples that referenced this pull request Nov 20, 2023
…devs#604)

* Move blackbox likelihoods to howto. Move samplers to samplers.

* Move blackbox likelihoods to howto. Move samplers to samplers.

* Move blackbox likelihoods to howto. Move samplers to samplers.

* Move blackbox likelihoods to howto. Move samplers to samplers.
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

Successfully merging this pull request may close these issues.

2 participants