Code Monkey home page Code Monkey logo

psis's Introduction

Pareto smoothed importance sampling (PSIS) and PSIS leave-one-out cross-validation reference code

Introduction

These files implement Pareto smoothed importance sampling (PSIS) and PSIS leave-one-out cross-validation for Matlab/Octave and Python (Python port made by Tuomas Sivula).

Corresponding R code

The corresponding R code can be found in R package called `loo' which is also available in CRAN.

Contents

Matlab/Octave code in 'm' folder

  • 'psislw.m' - Pareto smoothing of the log importance weights
  • 'psisloo.m' - Pareto smoothed importance sampling leave-one-out log predictive densities
  • 'gpdfitnew.m' - Estimate the paramaters for the Generalized Pareto Distribution
  • 'sumlogs.m' - Sum of vector where numbers are represented by their logarithms

Python module in 'py' folder

  • 'psis.py' - Includes the following functions in a Python (Numpy) module
    • psislw - Pareto smoothing of the log importance weights
    • psisloo - Pareto smoothed importance sampling leave-one-out log predictive densities
    • gpdfitnew - Estimate the paramaters for the Generalized Pareto Distribution
    • gpinv - Inverse Generalised Pareto distribution function.
    • sumlogs - Sum of vector where numbers are represented by their logarithms

References

  • Aki Vehtari, Andrew Gelman and Jonah Gabry (2016). Pareto smoothed importance sampling. arXiv preprint arXiv:1507.02646
  • Aki Vehtari, Andrew Gelman and Jonah Gabry (2016). Practical Bayesian model evaluation using leave-one-out cross-validation and WAIC. In Statistics and Computing, doi:10.1007/s11222-016-9696-4. arXiv preprint arXiv:1507.04544
  • Jin Zhang & Michael A. Stephens (2009) A New and Efficient Estimation Method for the Generalized Pareto Distribution, Technometrics, 51:3, 316-325, DOI: 10.1198/tech.2009.08017

psis's People

Contributors

avehtari avatar

Watchers

James Cloos avatar Kha 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.