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

WAIC/LOO only consider last chain in a Multitrace #2457

Closed
AustinRochford opened this issue Jul 31, 2017 · 4 comments
Closed

WAIC/LOO only consider last chain in a Multitrace #2457

AustinRochford opened this issue Jul 31, 2017 · 4 comments
Labels

Comments

@AustinRochford
Copy link
Member

See this gist for a demonstration. Of course, the WAIC values across difference chains should not be too different, if the sampling has been effective. This may also affect other stat functions, I haven't checked yet.

@aseyboldt thoughts on what the correct behavior should be here?

@aseyboldt
Copy link
Member

Hm. Intuitively I'd say we should probably merge the logp values from the traces, excluding tuning samles. It would be strange to use only one chain. That would though out a lot of data and the choice would be completely arbitrary.
So maybe check hasattr(trace, 'stat_names') and 'tune' in trace.stat_names or so and then filter out tuning samples.

@junpenglao
Copy link
Member

junpenglao commented Jul 31, 2017

Looks like a bug, we should just combine the traces when njobs>1.

@AustinRochford
Copy link
Member Author

Hmm, I think the simplest solution here is, when iterating over a multi trace, to iterate over all chains, not just the last chain, as is currently done.

@junpenglao
Copy link
Member

Is that how https://github.com/stan-dev/loo compute the loo/waic? Is it better to just combine all the traces together?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants