Giter Site home page Giter Site logo

hongruzhai / loo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from stan-dev/loo

0.0 0.0 0.0 85.59 MB

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

Home Page: https://mc-stan.org/loo

License: GNU General Public License v3.0

R 100.00%

loo's Introduction

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.

loo's People

Contributors

jgabry avatar mansmeg avatar topipa avatar avehtari avatar paul-buerkner avatar yao-yl avatar bnicenboim avatar leevilindgren avatar mcol avatar cfhammill avatar fweber144 avatar rok-cesnovar avatar ecmerkle avatar jrnold avatar krz avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.