-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
SMC return inferencedata and perform convergence checks #4814
Conversation
5d0aa63
to
e738c67
Compare
Apologies for the reviewers spam, just thought that all of you might have a better understanding of the InferenceData than me :D |
e738c67
to
75a3cf9
Compare
Just for the record and summarizing our previous conversation.
|
I am reading here https://arviz-devs.github.io/arviz/schema/schema.html?highlight=sample_stats#sample-stats, and it seems |
Pushed changes to include the sampler stats as well. Feels pretty hacky, because I have to deal with the case where chains have different numbers of draws. Let me know if you have a better suggestion |
I think that sample_stats should be more general, but that's on the ArviZ side. Different chains should have the same number of draws. |
What I was calling draws here are the "stages". Sorry for the confusion. Those can vary between chains |
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.
LGTM
The current |
I think is not worth the trouble at this point. |
This PR makes
sample_smc
return InferenceData and run convergence checks by default.@aloctavodia I am not familiar at all with
InferenceData
objects so let me know if I am doing something wrong or not returning as much information as we could / should.You mentioned in #4802 (comment) that we could store the
betas
and thelog_likelihood
insample_stats
. However, thelog_likelihood
appears magically in the returned idata, is this one correct? Should we manually add ours instead, since it is already pre-computed. Or did you mean thelog_marginal_likelihood
?These are the variables stored previously in
trace.report
:Also I am running the same convergence checks as in the normal
pm.sample
, should we do this or instead, implement specific checks forSMC
(or do nothing at all)?