Closed sethaxen closed 3 years ago
Thanks for bringing this up, and the very thorough issue report. It is on my radar and I plan to fix this. Feel free to ping me if I don't get to it before January.
@sethaxen: apologies that this took such a long time, the fix is simple but I wanted to understand the math first. Thanks again for suggesting this.
There was recently some discussion on Stan Discourse that resulted in this PR in Stan and this PR in PyMC3. They make some changes to the NUTS criterion to handle a previously undiscovered case where the NUTS criterion failed to catch a U-turn. Has this been implemented here yet? (I haven't yet researched what the fix entailed)
Self-contained example that demonstrates the problem
This post gave an example model that exhibits the failed behavior. I've reproduced it here:
On my machine,
nsat
is 9, i.e. 9/20000 (0.045 %) trajectories didn't detect a u-turn, which is on the same order as the Stan example before the fix was merged (0.12%).