Implement robust U-turn check#3605
Merged
Merged
Conversation
Following the recent discussion on the Stan side: stan-dev/stan#2800 For experiment, do not merge.
Member
Author
|
Thanks to @aseyboldt's design, adding additional U turn check to pymc3 NUTS is actually pretty straightforward, because we are already saving the beginning and the end point of each tree trajectory. |
Following the recent discussion on the Stan side: stan-dev/stan#2800 For experiment, do not merge.
Member
|
Looks like this needs a rebase. |
Codecov Report
@@ Coverage Diff @@
## master #3605 +/- ##
==========================================
+ Coverage 89.77% 89.79% +0.02%
==========================================
Files 134 134
Lines 20027 20047 +20
==========================================
+ Hits 17980 18002 +22
+ Misses 2047 2045 -2
|
Member
|
This looks good to me, I'd be in favor of merging. |
aseyboldt
approved these changes
Oct 17, 2019
Member
|
+1 I'll also leave this here for us to keep an eye on :D |
Member
|
👍 |
Closed
facebook-github-bot
pushed a commit
to facebookresearch/beanmachine
that referenced
this pull request
Jun 4, 2021
Summary: Pull Request resolved: #864 An issue with the U-turn condition was discovered and discussed in [this post in Stan forum](https://discourse.mc-stan.org/t/nuts-misses-u-turns-runs-in-circles-until-max-treedepth/9727) TL;DR: we can make the U-turn condition more robust by introducing two additional checks across subtrees. This can help us avoid missing U-turns for approximately iid normal models. {F619223264} Since the tree combining code are almost identical in `_build_tree` and `propose`, I also take the chance to refactor them into a common function called `_combine_tree`. If you look closely you will notice that most part of `_combine_tree` are moved from existing code as-is. The only addition is the two additional call to `_is_u_turning` Related PR that implements this change: - Stan: stan-dev/stan#2800 - PyMC3: pymc-devs/pymc#3605 - Turing.jl: TuringLang/AdvancedHMC.jl#207 - DynamicHMC.jl: tpapp/DynamicHMC.jl#145 Reviewed By: neerajprad Differential Revision: D28735950 fbshipit-source-id: ada4ebcad26a87ef5e697f422b5c5b17007afe42
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.
Following the recent discussion on the Stan side: stan-dev/stan#2800