-
Notifications
You must be signed in to change notification settings - Fork 419
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
Improve GammaIPSampler
and GammaMTSampler
#1617
Conversation
GammaIPSampler
GammaIPSampler
and GammaMTSampler
GammaMTSampler(d, c, κ) | ||
|
||
# We also pre-compute the factor in the squeeze function | ||
return GammaMTSampler(promote(d, c, κ, 331//10_000)...) |
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.
On the master branch, an unnecessarily large factor of 0.331 is used in the squeeze function (reference: https://dl.acm.org/doi/10.1145/358407.358414)..
Codecov ReportBase: 85.95% // Head: 85.94% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #1617 +/- ##
==========================================
- Coverage 85.95% 85.94% -0.01%
==========================================
Files 129 129
Lines 8086 8098 +12
==========================================
+ Hits 6950 6960 +10
- Misses 1136 1138 +2
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Co-authored-by: David Widmann <devmotion@users.noreply.github.com>
Co-authored-by: David Widmann <devmotion@users.noreply.github.com>
This PR fixes the comment #1615 (comment).
This improves performance:
On the master branch
This PR
Edit:
The fixes of
GammaIPSampler
required a generalization of theGammaMTSampler
. When updating it I discovered a bug in the current implementation: The factor in the squeeze function (used in the cheap acceptance check) was incorrect and hence unnecessarily often the more expensive acceptance check had to be evaluated. Fixing this issue leads to a significant performance improvement:On the master branch
With this PR