PSIS
Pareto smoothed importance sampling (PSIS) and PSIS leave-one-out cross-validation for Python and Matlab/Octave
Install / Use
/learn @avehtari/PSISREADME
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).
These code are not maintained and are here for historical reference. Instead of these, use well maintained implementations available for R, Python, and Julia as listed below.
R
- PSIS and PSIS-LOO are implemented in the
looR package, which is also available from CRAN. - PSIS and all Pareto $\hat{k}$ diagnostics are implemented in the
posteriorR package, which is also available from CRAN.
Python
-
PSIS, PSIS-LOO, and Pareto $\hat{k}$ diagnostics are implemented in the
ArviZ.pypackage. -
In this repo
- '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
Julia
- PSIS, PSIS-LOO, and Pareto $\hat{k}$ diagnostics are implemented in the
ArviZ.jlpackage.
Matlab/Octave
- In this repo
- '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
References
- Aki Vehtari, Andrew Gelman and Jonah Gabry (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. arXiv preprint arXiv:1507.04544
- Aki Vehtari, Daniel Simpson, Andrew Gelman, Yuling Yao, and Jonah Gabry (2024). Pareto smoothed importance sampling. Journal of Machine Learning Research, accepted for publication. arXiv preprint arXiv:1507.02646
- 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
Related Skills
node-connect
351.8kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
110.9kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
351.8kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
351.8kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
