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

Add log_prob() to RestrictedPrior #642

Merged
merged 2 commits into from
Feb 9, 2022
Merged

Add log_prob() to RestrictedPrior #642

merged 2 commits into from
Feb 9, 2022

Conversation

michaeldeistler
Copy link
Contributor

The RestrictedPrior was not originally meant to be passed as a prior to SNPE. But this has been requested in #640. Thus, we are allowing this with this PR. In order to do this, we add a .log_prob() method to the RestrictedPrior.

Copy link
Contributor

@janfb janfb left a comment

Choose a reason for hiding this comment

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

Looks great! Can we set up a test for the prior.log_prob to ensure it's working as expected?

@michaeldeistler
Copy link
Contributor Author

Good point! I added a test. The test takes about 10 seconds.

@michaeldeistler michaeldeistler force-pushed the restriction-fix branch 2 times, most recently from 0145dca to cb6abc1 Compare February 9, 2022 14:10
Copy link
Contributor

@janfb janfb left a comment

Choose a reason for hiding this comment

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

Great, thanks a lot!

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.

Problems with restriction estimator tutorial
2 participants