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
I've been experimenting with ModelBuilder to get a cleaner API for fitting/saving/loading/predicting, but I'm a bit confused by the shape of predict_posterior() output.
I would expect to get samples from the posterior predictive distribution for each chain and draw, but I'm getting what appear to be values from just one chain.
I would expect that sampling from the posterior predictive distribution with prediction_data would yield an array of shape (chains, draws, samples). In this case I'd like posterior predictive samples of shape (3, 1000, 100) rather than (1000, 100).
I've been experimenting with ModelBuilder to get a cleaner API for fitting/saving/loading/predicting, but I'm a bit confused by the shape of
predict_posterior()
output.I would expect to get samples from the posterior predictive distribution for each chain and draw, but I'm getting what appear to be values from just one chain.
Here's a reproducible example:
I would expect that sampling from the posterior predictive distribution with
prediction_data
would yield an array of shape(chains, draws, samples)
. In this case I'd like posterior predictive samples of shape(3, 1000, 100)
rather than(1000, 100)
.Perhaps this is due to indexing with
[0]
here, which would appear to select values from just the first chain? https://github.com/pymc-devs/pymc-experimental/blob/5f1c2bbcdd3aceea4a53bbe2db509d8e88e7595d/pymc_experimental/model_builder.py#L350Are my expectations not aligned with the intended behavior? Happy to have missed something. Thanks! 😃
The text was updated successfully, but these errors were encountered: