All Projects → stan-dev → Loo

stan-dev / Loo

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

Programming Languages

r
7636 projects

Projects that are alternatives of or similar to Loo

Rstanarm
rstanarm R package for Bayesian applied regression modeling
Stars: ✭ 285 (+168.87%)
Mutual labels:  bayesian-data-analysis, stan, r-package, bayesian-methods
Shinystan
shinystan R package and ShinyStan GUI
Stars: ✭ 172 (+62.26%)
Mutual labels:  bayesian-data-analysis, stan, r-package, bayesian-methods
Tidybayes
Bayesian analysis + tidy data + geoms (R package)
Stars: ✭ 557 (+425.47%)
Mutual labels:  bayesian-data-analysis, stan, r-package
Stan
Stan development repository. The master branch contains the current release. The develop branch contains the latest stable development. See the Developer Process Wiki for details.
Stars: ✭ 2,177 (+1953.77%)
Mutual labels:  bayesian-data-analysis, stan, bayesian-methods
Rstan
RStan, the R interface to Stan
Stars: ✭ 760 (+616.98%)
Mutual labels:  bayesian-data-analysis, stan, r-package
stan-ja
Stanマニュアルの日本語への翻訳プロジェクト
Stars: ✭ 53 (-50%)
Mutual labels:  stan, bayesian-data-analysis
cmdstanr
CmdStanR: the R interface to CmdStan
Stars: ✭ 82 (-22.64%)
Mutual labels:  stan, r-package
Bayesplot
bayesplot R package for plotting Bayesian models
Stars: ✭ 276 (+160.38%)
Mutual labels:  stan, r-package
wopr
An R package and Shiny application to provide API access to the WorldPop Open Population Repository (WOPR)
Stars: ✭ 28 (-73.58%)
Mutual labels:  bayesian-methods, r-package
Bda r demos
Bayesian Data Analysis demos for R
Stars: ✭ 409 (+285.85%)
Mutual labels:  bayesian-data-analysis, stan
Bayesian Analysis Recipes
A collection of Bayesian data analysis recipes using PyMC3
Stars: ✭ 479 (+351.89%)
Mutual labels:  bayesian-data-analysis, bayesian-methods
LogDensityProblems.jl
A common framework for implementing and using log densities for inference.
Stars: ✭ 26 (-75.47%)
Mutual labels:  bayesian-methods, bayesian-data-analysis
covidestim
Bayesian nowcasting with adjustment for delayed and incomplete reporting to estimate COVID-19 infections in the United States
Stars: ✭ 20 (-81.13%)
Mutual labels:  stan, r-package
covidseir
Bayesian SEIR model to estimate the effects of social-distancing on COVID-19
Stars: ✭ 23 (-78.3%)
Mutual labels:  stan, r-package
geostan
Bayesian spatial analysis
Stars: ✭ 40 (-62.26%)
Mutual labels:  stan, r-package
Brms
brms R package for Bayesian generalized multivariate non-linear multilevel models using Stan
Stars: ✭ 825 (+678.3%)
Mutual labels:  stan, r-package
Bda py demos
Bayesian Data Analysis demos for Python
Stars: ✭ 781 (+636.79%)
Mutual labels:  bayesian-data-analysis, stan
Ggmcmc
Graphical tools for analyzing Markov Chain Monte Carlo simulations from Bayesian inference
Stars: ✭ 95 (-10.38%)
Mutual labels:  bayesian-data-analysis, stan
Bayes Vis Paper
'Visualization in Bayesian workflow' by Gabry, Simpson, Vehtari, Betancourt, and Gelman. (JRSS discussion paper and code)
Stars: ✭ 47 (-55.66%)
Mutual labels:  bayesian-data-analysis, stan
Rhat ess
Rank-normalization, folding, and localization: An improved R-hat for assessing convergence of MCMC
Stars: ✭ 19 (-82.08%)
Mutual labels:  bayesian-data-analysis, bayesian-methods

loo

CRAN_Status_Badge RStudio_CRAN_mirror_downloads_badge codecov R-CMD-check

Efficient approximate leave-one-out cross-validation for fitted Bayesian models

loo is an R package that allows users to compute efficient approximate leave-one-out cross-validation for fitted Bayesian models, as well as model weights that can be used to average predictive distributions. The loo package package implements the fast and stable computations for approximate LOO-CV and WAIC from

  • Vehtari, A., Gelman, A., and Gabry, J. (2017). Practical Bayesian model evaluation using leave-one-out cross-validation and WAIC. Statistics and Computing. 27(5), 1413--1432. doi:10.1007/s11222-016-9696-4. Online, arXiv preprint arXiv:1507.04544.

and computes model weights as described in

  • Yao, Y., Vehtari, A., Simpson, D., and Gelman, A. (2018). Using stacking to average Bayesian predictive distributions. In Bayesian Analysis, doi:10.1214/17-BA1091. Online, arXiv preprint arXiv:1704.02030.

From existing posterior simulation draws, we compute approximate LOO-CV using Pareto smoothed importance sampling (PSIS), a new procedure for regularizing importance weights. As a byproduct of our calculations, we also obtain approximate standard errors for estimated predictive errors and for comparing predictive errors between two models. We recommend PSIS-LOO-CV instead of WAIC, because PSIS provides useful diagnostics and effective sample size and Monte Carlo standard error estimates.

Resources

Installation

  • Install the latest release from CRAN:
install.packages("loo")
  • Install the latest development version from GitHub:
# install.packages("remotes")
remotes::install_github("stan-dev/loo")

We do not recommend setting build_vignettes=TRUE when installing from GitHub because some of the vignettes take a long time to build and are always available online at mc-stan.org/loo/articles/.

Python and Matlab/Octave Code

Corresponding Python and Matlab/Octave code can be found at the avehtari/PSIS repository.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].