Implement Resamper for interactive prior tuning#3118
Merged
Conversation
fritzo
commented
Jul 19, 2022
| # This is also used if you do content translation via gettext catalogs. | ||
| # Usually you set "language" from the command line for these cases. | ||
| language = None | ||
| language = "en" |
Member
Author
There was a problem hiding this comment.
this silences a new sphinx warning
Collaborator
|
happy to review but will need a walk-through |
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Member
Author
|
@martinjankowiak sure I'd be happy to walk you through over zoom some evening. I've also added a notebook if you want to run that locally. The algorithm is cute, but the interface seems awkward, lying somewhere between Distributions and models. Advice welcome. |
Member
Author
|
ok, I've simplified and improved the interface to use a more idiomatic (model,guide) pair. |
Collaborator
|
notebooks typos:
|
martinjankowiak
previously approved these changes
Jul 25, 2022
martinjankowiak
approved these changes
Jul 25, 2022
OlaRonning
pushed a commit
to aleatory-science/pyro
that referenced
this pull request
Aug 2, 2022
* Implement ResamplingCache * Vectorize for speed * lint * optimization nit * More optimization * Completely vectorize * Generalize to multiple distributions * Add a tutorial * Refactor to use models * Simplified, but introduced a bug 😕 * fix bug * Update tutorial * Implement stable sampling via Gumbel-max trick * Change nomenclature * Update prior_predictive.ipynb Fix colab link * Install pyro-ppl in colab * Address review comments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This implements an importance resampler as a computational aid for interactively tuning prior predictive samples early in ones Bayesian workflow.
Additional work
Tested
new tests complete in <0.1sec on my machine
Open in Colab, you'll need to replace the pip install line with: