arviz.from_pyro#

arviz.from_pyro(posterior=None, *, prior=None, posterior_predictive=None, log_likelihood=None, predictions=None, constant_data=None, predictions_constant_data=None, coords=None, dims=None, pred_dims=None, num_chains=1)[source]#

Convert Pyro data into an InferenceData object.

For a usage example read the Creating InferenceData section on from_pyro

Parameters:
posteriorpyro.infer.MCMC

Fitted MCMC object from Pyro

prior: dict

Prior samples from a Pyro model

posterior_predictivedict

Posterior predictive samples for the posterior

log_likelihoodbool, optional

Calculate and store pointwise log likelihood values. Defaults to the value of rcParam data.log_likelihood.

predictions: dict

Out of sample predictions

constant_data: dict

Dictionary containing constant data variables mapped to their values.

predictions_constant_data: dict

Constant data used for out-of-sample predictions.

coordsdict[str] -> list[str]

Map of dimensions to coordinates

dimsdict[str] -> list[str]

Map variable names to their coordinates

pred_dims: dict

Dims for predictions data. Map variable names to their coordinates.

num_chains: int

Number of chains used for sampling. Ignored if posterior is present.