arviz.waic(data, pointwise=False, scale='deviance')[source]

Calculate the widely available information criterion.

Also calculates the WAIC’s standard error and the effective number of parameters of the samples in trace from model. Read more theory here - in a paper by some of the leading authorities on model selection


Any object that can be converted to an az.InferenceData object Refer to documentation of az.convert_to_dataset for details

pointwise: bool

if True the pointwise predictive accuracy will be returned. Default False


Output scale for loo. Available options are:

  • deviance : (default) -2 * (log-score)

  • log : 1 * log-score

  • negative_log : -1 * (log-score)

DataFrame with the following columns:
waic: widely available information criterion
waic_se: standard error of waic
p_waic: effective number parameters
var_warn: 1 if posterior variance of the log predictive

densities exceeds 0.4

waic_i: and array of the pointwise predictive accuracy, only if pointwise True
waic_scale: scale of the waic results