model-evaluation
Installation
SKILL.md
Model Evaluation and Comparison (ArviZ 1.1)
CRITICAL: PyMC 6 returns xarray DataTree objects by default, and ArviZ 1.1 stats/plots are DataTree-first while still accepting idata-like inputs. az.waic is removed entirely — use PSIS-LOO-CV exclusively. Default credible intervals are 0.89 ETI, controlled via ci_prob= and ci_kind= for summaries/plots; low-level hdi() uses prob=.
For model building context, prior selection, and convergence diagnostics, see the pymc-modeling skill.
LOO-CV with ArviZ 1.1
Leave-one-out cross-validation via Pareto-smoothed importance sampling (PSIS).
import arviz_stats as azs
import arviz_plots as azp
# dt is a DataTree from pm.sample()
loo_result = azs.loo(dt)
print(loo_result)
# Returns: ELPDData with elpd, se, p, n_data_points, pareto_k