-
Notifications
You must be signed in to change notification settings - Fork 7
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 ESS estimates for antithetic chains #58
Conversation
Pull Request Test Coverage Report for Build 3911141108Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
Codecov ReportBase: 95.63% // Head: 95.64% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #58 +/- ##
==========================================
+ Coverage 95.63% 95.64% +0.01%
==========================================
Files 10 10
Lines 710 712 +2
==========================================
+ Hits 679 681 +2
Misses 31 31
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. |
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.
Thank you! A preliminary comment: could you add some references (to eg our discussion and in particular your last comment and the references therein) such that it is clear why these changes are added and where eg the bound on ESS came from?
@devmotion this is ready for final review |
# - https://github.com/TuringLang/MCMCDiagnosticTools.jl/issues/40 | ||
# - https://github.com/stan-dev/rstan/pull/618 | ||
# - https://github.com/stan-dev/stan/pull/2774 | ||
τ = max(0, 2 * sum_pₜ + max(0, ρ_even) - 1) |
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.
Is this line "correct", i.e., desired, even if we never run the while
loop (i.e., if maxlag <= 2
? In these cases it would simplify to τ = max(0, 2 * sum_pₜ)
since ρ_even = 1
. And in contrast to the other values we would use the last ρ_odd
.
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.
No it's not. I've modified to compute the final ρ_even
only if maxlag >= 2
. Otherwise it is set to 0 before this line.
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.
Thank you, looks good to me!
This PR fixes #40. It's marked as draft currently because I plan to use the test utilities in #53 to write the tests.