You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In some scenarios, sampling and prediction do not happen at the same time or even in the same process. sample_posterior_predictive can be fed with a MultiTrace, but in many scenarios, the trace is saved via arviz.to_netcdf and only the arviz.InferenceData is kept.
With this small function, one can convert an xarray.Dataset (the InferenceData.posterior) to a list of points that may be consumed by sample_posterior_predictive.
The list of points is probably not the most performant option. Maybe sample_posterior_predictive could be modified to consume the InferenceData object directly?
The text was updated successfully, but these errors were encountered:
The list of points is probably not the most performant option. Maybe sample_posterior_predictive could be modified to consume the InferenceData object directly?
Yes, for the vectorized version, I am already redoing the input away from being a set of points.
We could definitely consume the InferenceData object more directly, but sample_posterior_predictive needs access to the pm.Model object, so it's not sufficient to have a save and restore solution that is limited to the posterior trace alone.
Description of your problem
In some scenarios, sampling and prediction do not happen at the same time or even in the same process.
sample_posterior_predictive
can be fed with aMultiTrace
, but in many scenarios, the trace is saved viaarviz.to_netcdf
and only thearviz.InferenceData
is kept.With this small function, one can convert an
xarray.Dataset
(theInferenceData.posterior
) to a list of points that may be consumed bysample_posterior_predictive
.The list of points is probably not the most performant option. Maybe
sample_posterior_predictive
could be modified to consume theInferenceData
object directly?The text was updated successfully, but these errors were encountered: