Practical Bayesian model evaluation using leave-one-out cross-validation and WAIC

Aki Vehtari, Andrew Gelman, Jonah Gabry
7/16/2015
5,623 citations
stat.COstat.ME
bayesian

Official code: stan-dev/loo (159 stars, R, last commit 2026-10-19). 1 more implementation below.

Abstract

Leave-one-out cross-validation (LOO) and the widely applicable information criterion (WAIC) are methods for estimating pointwise out-of-sample prediction accuracy from a fitted Bayesian model using the log-likelihood evaluated at the posterior simulations of the parameter values. LOO and WAIC have various advantages over simpler estimates of predictive error such as AIC and DIC but are less used in practice because they involve additional computational steps.

Show full abstract

Here we lay out fast and stable computations for LOO and WAIC that can be performed using existing simulation draws. We introduce an efficient computation of LOO using Pareto-smoothed importance sampling (PSIS), a new procedure for regularizing importance weights. Although WAIC is asymptotically equal to LOO, we demonstrate that PSIS-LOO is more robust in the finite case with weak priors or influential observations. As a byproduct of our calculations, we also obtain approximate standard errors for estimated predictive errors and for comparing of predictive errors between two models. We implement the computations in an R package called 'loo' and demonstrate using models fit with the Bayesian inference package Stan.

View on arXivView PDF

Code Implementations(2)

Code implementations of this paper
RepositoryTypeStarsLanguageLicenseLast commit
stan-dev/looOfficial159R–2026-10-19
avehtari/PSISOfficial85PythonGPL-3.02024-03-13
stan-dev/looOfficial100%

loo R package for approximate leave-one-out cross-validation (LOO-CV) and Pareto smoothed importance sampling (PSIS)

15938RJun 14, 20151 months agoNOASSERTION
bayesbayesianbayesian-data-analysisbayesian-inferencebayesian-methods+6 more
avehtari/PSISOfficial100%
GPL-3.0

Pareto smoothed importance sampling (PSIS) and PSIS leave-one-out cross-validation for Python and Matlab/Octave

8528Python, MATLABJul 10, 20152 years agoGPL-3.0

Similar Papers

Cite this paper

@article{vehtari2015practical,
  title  = {Practical Bayesian model evaluation using leave-one-out cross-validation and WAIC},
  author = {Aki Vehtari and Andrew Gelman and Jonah Gabry},
  year   = {2015},
  eprint = {1507.04544},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1507.04544}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/1507.04544.svg)](https://codeofpaper.com/paper/1507.04544)

Discussion