Skip to content
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

The chains do not converge to the same posterior #1593

Closed
DoktorMike opened this issue Apr 24, 2021 · 8 comments
Closed

The chains do not converge to the same posterior #1593

DoktorMike opened this issue Apr 24, 2021 · 8 comments

Comments

@DoktorMike
Copy link

DoktorMike commented Apr 24, 2021

Question on: https://github.com/TuringLang/Turing.jl/edit/master/docs/_tutorials/10_BayesianDiffEq.md

So in your excellent tutorial on Bayesian Differential Equations, you first Bayesian example does not converge. Basically each chain finds it's own posterior which is distinct from the others. I would suggest setting stricter priors such that the tutorial ends up with a success. 😇

image

This issue is also related to TuringLang/docs#292

@cpfiffer
Copy link
Member

@Vaibhavdixit02 I think might have some comments.

@devmotion
Copy link
Member

This is still an old version though (without Weave)?

@Vaibhavdixit02
Copy link

Good point @DoktorMike, the last setup with Jupyter notebooks was a little messy to work with and the diffeq tutorial didn't end up how it started out. Now that the move to jmd has been made as David is saying, I'll take a stab at updating it and hopefully we'll have better results.

@devmotion
Copy link
Member

@cpfiffer opened PR that adds some of the updates missing in the first iteration of the transition to jmd, so you might want to wait until everything is updated.

@cpfiffer
Copy link
Member

cpfiffer commented May 2, 2021

This should be updated now here. The woven version here seems to be converging to the same posterior for more chains, though it is still not generally consistent across chains.

@DoktorMike
Copy link
Author

This should be updated now here. The woven version here seems to be converging to the same posterior for more chains, though it is still not generally consistent across chains.

@cpfiffer Nice update. The posteriors I mentioned seems more aligned now. In the SDE example the plots look scary even though the difference in the inferred value is not big (though this of course depends on the resolution requirements of the problem which I did not look into). So purely based on the plots I would say that the SDE does not converge at all. As mentioned in the tutorial this might not be the best case for NUTS.

image

@devmotion
Copy link
Member

The SDE example is not correct currently (TuringLang/docs#118). @mschauer and I played around with a Crank-Nicolson scheme which seemed to work quite well in a simple example: I uploaded a version with AdvancedMH only and with Turing at https://gist.github.com/devmotion/37d8d706938364eeb900bc3678860da6.

@yebai
Copy link
Member

yebai commented Nov 13, 2022

Likely fixed by TuringLang/docs#118

@yebai yebai closed this as completed Nov 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants