Vehtari et al (2024) loo: Efficient leave-one-out cross-validation and WAIC for Bayesian models. Manual
Other documents for the same rulemaking (all, by stage)
References: 29 extracted, 0 linked to papers
Vehtari, A., Gelman, A., and Gabry, J. (2017). Practical Bayesian model evaluation using leave-oneout cross-validation and WAIC. Statistics and Computing. 27(5), 1413–1432. doi:10.1007/s11222016-9696-4 (journal version, preprint arXiv:1507.04544).
Vehtari, A., Simpson, D., Gelman, A., Yao, Y., and Gabry, J. (2024). Pareto smoothed importance sampling. Journal of Machine Learning Research, 25(72):1-58. PDF
Yao, Y., Vehtari, A., Simpson, D., and Gelman, A. (2018) Using stacking to average Bayesian predictive distributions. Bayesian Analysis, advance publication, doi:10.1214/17-BA1091. (online).
Magnusson, M., Riis Andersen, M., Jonasson, J. and Vehtari, A. (2019). Leave-One-Out CrossValidation for Large Data. In Thirty-sixth International Conference on Machine Learning, PMLR 97:4244-4253.
Magnusson, M., Riis Andersen, M., Jonasson, J. and Vehtari, A. (2020). Leave-One-Out CrossValidation for Model Comparison in Large Data. In Proceedings of the 23rd International Conference on Artificial Intelligence and Statistics (AISTATS), PMLR 108:341-351.
Epifani, I., MacEachern, S. N., and Peruggia, M. (2008). Case-deletion importance sampling estimators: Central limit theorems and related results. Electronic Journal of Statistics 2, 774-806.
E. (1996). Model determination using sampling-based methods. In Markov Chain Monte Carlo in Practice, ed. W. R. Gilks, S. Richardson, D. J. Spiegelhalter, 145-162. London: Chapman and Hall.
Gelfand, A. E., Dey, D. K., and Chang, H. (1992). Model determination using predictive distributions with implementation via sampling-based methods. In Bayesian Statistics 4, ed. J. M.
Gelman, A., Hwang, J., and Vehtari, A. (2014). Understanding predictive information criteria for Bayesian models. Statistics and Computing 24, 997-1016.
L. (2008). Truncated importance sampling. Journal of Computational and Graphical Statistics 17, 295-311.
Koopman, S. J., Shephard, N., and Creal, D. (2009). Testing the assumptions behind importance sampling. Journal of Econometrics 149, 2-11.
Peruggia, M. (1997). On the variability of case-deletion importance sampling weights in the Bayesian linear model. Journal of the American Statistical Association 92, 199-207.
Stan Development Team (2017). The Stan C++ Library, Version 2.17.0. https://mc-stan.org.
Stan Development Team (2018). RStan: the R interface to Stan, Version 2.17.3. https://mc-stan. org. ap_psis
Watanabe, S. (2010). Asymptotic equivalence of Bayes cross validation and widely application information criterion in singular learning theory. Journal of Machine Learning Research 11, 35713594.
A. (2009). A new and efficient estimation method for the generalized Pareto distribution. Technometrics 51, 316-325. See Also Useful links: • https://mc-stan.org/loo/ • https://discourse.mc-stan.org • Report bugs at https://github.com/stan-dev/loo/issues ap_psis Pareto smoothed importance sampling (PSIS) using approximate posteriors Description Pareto smoothed importance sampling (PSIS) using approximate posteriors Usage ap_psis(log_ratios, log_p, log_g, ...) ## S3 method for class 'array' ap_psis(log_ratios, log_p, log_g, ..., cores = getOption("mc.cores", 1)) ## S3 method for class 'matrix' ap_psis(log_ratios, log_p, log_g, ..., cores = getOption("mc.cores", 1)) ## Default S3 method: ap_psis(log_ratios, log_p, log_g, ...) Arguments log_ratios The log-likelihood ratios (ie -log_liks) log_p The log-posterior (target) evaluated at S samples from the proposal distribution (g). A vector of length S. log_g The log-density (proposal) evaluated at S samples from the proposal distribution (g). A vector of length S. Currently not in use. compare cores The number of cores to use for parallelization. This defaults to the option mc.cores which can be set for an entire R session by options(mc.cores =
Bolin, D., & Wallin, J. (2022). Local scale invariance and robustness of proper scoring rules. arXiv. doi:10.48550/arXiv.1912.05642
McElreath, R. (2016a). rethinking: Statistical Rethinking book package. R package version 1.59.
McElreath, R. (2016b). Statistical rethinking: A Bayesian course with examples in R and Stan. Chapman & Hall/CRC. A. Tsanas, M.A. Little, C. Fox, L.O. Ramig: Objective automatic assessment of rehabilitative speech treatment in Parkinson’s disease, IEEE Transactions on Neural Systems and Rehabilitation
Engineering, Vol. 22, pp. 181-190, January 2014 Examples str(Kline) str(milk) loo-glossary loo-glossary
LOO package glossary Description The pages provides definitions to key terms. Also see the FAQ page on the loo website for answers to frequently asked questions. Note: VGG2017 refers to Vehtari, Gelman, and Gabry (2017). See References, below.
Sivula, T, Magnusson, M., Matamoros A. A., and Vehtari, A. (2022). Uncertainty in Bayesian leave-one-out cross-validation based model comparison. preprint arXiv:2008.10296v3..
McLatchie, Y., and Vehtari, A. (2023). Efficient estimation and correction of selection-induced bias with order statistics. preprint arXiv:2309.03742 See Also • The FAQ page on the loo website for answers to frequently asked questions. loo_model_weights Examples # very artificial example, just for demonstration!
LL <- example_loglik_array() loo1 <- loo(LL) # should be worst model when compared loo2 <- loo(LL + 1) # should be second best model when compared loo3 <- loo(LL + 2) # should be best model when compared comp <- loo_compare(loo1, loo2, loo3) print(comp, digits = 2) # show more details with simplify=FALSE # (will be the same for all models in this artificial example) print(comp, simplify = FALSE, digits = 3) # can use a list of objects with custom names # will use apple, banana, and cherry, as the names in the output loo_compare(list("apple" = loo1, "banana" = loo2, "cherry" = loo3)) ## Not run: # works for waic (and kfold) too loo_compare(waic(LL), waic(LL - 10)) ## End(Not run) loo_model_weights Model averaging/weighting via stacking or pseudo-BMA weighting Description Model averaging via stacking of predictive distributions, pseudo-BMA weighting or pseudo-BMA+ weighting with the Bayesian bootstrap. See Yao et al. (2018), Vehtari, Gelman, and Gabry (2017), and Vehtari, Simpson, Gelman, Yao, and Gabry (2024) for background. Usage loo_model_weights(x, ...) ## Default S3 method: loo_model_weights( ..., method = c("stacking", "pseudobma"), optim_method = "BFGS", optim_control = list(),
IS and TIS (see Vehtari et al (2024) for details). However, the PSIS effective sample size estimate will be over-optimistic when the estimate of k is greater than min(1−1/log10(S), 0.7), where S is the sample size. Value pareto_k_table() returns an object of class "pareto_k_table", which is a matrix with columns "Count", "Proportion", and "Min. n_eff", and has its own print method. pareto_k_ids() returns an integer vector indicating which observations have Pareto k estimates above threshold. pareto_k_values() returns a vector of the estimated Pareto k parameters. These represent the reliability of sampling. pareto_k_influence_values() returns a vector of the estimated Pareto k parameters. These represent influence of the observations on the model posterior distribution. psis_n_eff_values() returns a vector of the estimated PSIS effective sample sizes. mcse_loo() returns the Monte Carlo standard error (MCSE) estimate for PSIS-LOO. MCSE will be NA if any Pareto k values are above threshold. The plot() method is called for its side effect and does not return anything. If x is the result of a call to loo() or psis() then plot(x, diagnostic) produces a plot of the estimates of the Pareto shape parameters (diagnostic = "k") or estimates of the PSIS effective sample sizes (diagnostic = "ESS"). References
Vehtari, A., Simpson, D., Gelman, A., Yao, Y., and Gabry, J. (2024). Pareto smoothed importance sampling. Journal of Machine Learning Research, 25(72):1-58. PDF See Also • The loo package vignettes and Vehtari, Gelman, and Gabry (2017) and Vehtari, Simpson,
<doi:10.1007/s11222-016-9696-4
Bayesian workflow. J. R. Stat. Soc. A, 182: 389-402. doi:10.1111/rssa.12378
sampling. Statistics and Computing, 31, 16. doi:10.1007/s11222-020-09982-2.