-
-
Notifications
You must be signed in to change notification settings - Fork 411
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
Loading PPC data into arviz in pymc3 #1282
Comments
I think one more thing to add here: in my use case, I am using |
To add posterior predictive samples to an inference data object with pymc3, I think the best approach is:
There is also issue #1239 to make this last line less convoluted. As Robert pointed out, to add predictions (out of sample posterior predictive samples) the way to go should be I commented in the issue you linked as there seems to be a bug with |
Thanks, the az.concat idea is working, and I'm testing out the PR branch of pymc3 that fixes the keep_size issue. So I think I'm now on track again :). |
Do we still need to keep this issue open? |
I wonder if we should make automating this an option in the PyMC3 predictive samplings. E.g., add an @OriolAbril 's method is definitely the right one, but it seems inconvenient to make the user have to know to use To me, what |
It would probably be helpful to have PyMC3 add the results to idata directly. Regarding |
I'm fine to close this ticket for now. I was able to get a script running to do PPC analysis in arviz with the currently available functions. I'll open new tickets if I see any new gaps. |
I’m likely to open a merge request on PyMC3 for this. |
Here's a start: pymc-devs/pymc#4021 -- has only been applied to kwarg used is |
Currently, the easiest way to get data from pymc3 into arviz is via
pm.sample(return_inferencedata=True)
, which gives back an arviz InferenceData object. However,pm.sample_posterior_predictive()
only supports dictionary returns.It's unclear what the right approach is, as at this point the InferenceData object is already created. I guess we either need an easy, dimension-aware way to add the PPC data later or create a new object with it.
The text was updated successfully, but these errors were encountered: