API Overview

Plots

NameDescription
plot_autocorrBar plot of the autocorrelation function for a sequence of data.
plot_bpvPlot Bayesian p-value for observed data and Posterior/Prior predictive.
plot_compareSummary plot for model comparison.
plot_densityGenerate KDE plots for continuous variables and histograms for discrete ones.
plot_distPlot distribution as histogram or kernel density estimates.
plot_dist_comparisonPlot to compare fitted and unfitted distributions.
plot_elpdPlot a scatter or hexbin matrix of the sampled parameters.
plot_energyPlot energy transition distribution and marginal energy distribution in HMC algorithms.
plot_essPlot quantile, local or evolution of effective sample sizes (ESS).
plot_forestForest plot to compare HDI intervals from a number of distributions.
plot_hdiPlot HDI intervals for regression data.
plot_kde1D or 2D KDE plot taking into account boundary conditions.
plot_khatPlot Pareto tail indices.
plot_loo_pitPlot Leave-One-Out (LOO) probability integral transformation (PIT) predictive checks.
plot_mcsePlot quantile, local or evolution of effective sample sizes (ESS).
plot_pairPlot a scatter, kde and/or hexbin matrix with (optional) marginals on the diagonal.
plot_parallelPlot parallel coordinates plot showing posterior points with and without divergences.
plot_posteriorPlot Posterior densities in the style of John K.
plot_ppcPlot for posterior predictive checks.
plot_rankPlot rank order statistics of chains.
plot_separationSeparation plot for binary outcome models.
plot_tracePlot distribution (histogram or kernel density estimates) and sampled values.
plot_violinPlot posterior of traces as violin plot.

Stats

NameDescription
summarystatsCompute summary statistics on an InferenceData
compareCompare models based on WAIC or LOO cross-validation.
hdiCalculate highest density interval (HDI) of array for given probability.
looPareto-smoothed importance sampling leave-one-out (LOO) cross-validation.
loo_pitCompute leave-one-out probability integral transform (PIT) values.
psislwPareto smoothed importance sampling (PSIS). (deprecated)
psisPareto smoothed importance sampling (PSIS).
psis!Pareto smoothed importance sampling (PSIS) in-place.
PSISResultContainer for results of Pareto smoothed importance sampling.
r2_score$R^2$ for Bayesian regression models.
waicCalculate the widely available information criterion (WAIC).

Diagnostics

NameDescription
bfmiCalculate the estimated Bayesian fraction of missing information (BFMI).
essCalculate estimate of the effective sample size (ESS).
rhatCompute estimate of rank normalized split-$\hat{R}$ for a set of traces.
mcseCalculate Markov Chain Standard Error statistic (MCSE).

Stats utils

NameDescription
autocovCompute autocovariance estimates for every lag for the input array.
autocorrCompute autocorrelation using FFT for every lag for the input array.
make_ufuncMake ufunc from a function taking 1D array input.
wrap_xarray_ufuncWrap make_ufunc with xarray.apply_ufunc.

Data

NameDescription
InferenceDataContainer for inference data storage using xarray.
convert_to_inference_dataConvert a supported object to an InferenceData.
load_arviz_dataLoad a local or remote pre-made dataset.
extract_datasetExtract an InferenceData group or subset of it as an ArviZ.Dataset.
to_netcdfSave dataset as a netcdf file.
from_netcdfLoad netcdf file back into an InferenceData.
from_namedtupleConvert NamedTuple data into an InferenceData.
from_dictConvert Dict data into an InferenceData.
from_cmdstanConvert CmdStan data into an InferenceData.
from_mcmcchainsConvert MCMCChains data into an InferenceData.
from_samplechainsConvert SampleChains data into an InferenceData.
concatConcatenate InferenceData objects.
concat!Concatenate InferenceData objects in-place.

Utils

NameDescription
with_interactive_backendChange plotting backend temporarily.

rcParams

NameDescription
rcParamsAccess ArviZ's matplotlib-style rc settings and change them long-term.
with_rc_contextChange ArviZ's rc settings temporarily.