-
Notifications
You must be signed in to change notification settings - Fork 155
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
Fix bug in importance sampled posterior #1081
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this 🙏
This PR also contains the tutorial. Shall we close #1080 then and do both in this PR?
@@ -253,7 +253,7 @@ def _sir_sample( | |||
self.potential_fn, | |||
proposal=self.proposal, | |||
num_samples=num_samples, | |||
oversampling_factor=oversampling_factor, | |||
num_candidate_samples=oversampling_factor, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @max-dax!
What does this implement/fix? Explain your changes
When running importance sampling with sir,
ImportanceSamplingPosterior._sir_sample
used the wrong kwarg foroversampling_factor
when calling the sir function, such that this function always ran with a defaultoversampling_factor
of 32.Does this close any currently open issues?
Fixes # (issue)
Any relevant code examples, logs, error output, etc?
...
Any other comments?
...
Checklist
Put an
x
in the boxes that apply. You can also fill these out after creatingthe PR. If you're unsure about any of them, don't hesitate to ask. We're here to
help! This is simply a reminder of what we are going to look for before merging
your code.
guidelines
with
pytest.mark.slow
.guidelines
main
(or there are no conflicts withmain
)