View source: R/psis_approximate_posterior.R
psis_approximate_posterior | R Documentation |
Diagnostics for Laplace and ADVI approximations and Laplace-loo and ADVI-loo
psis_approximate_posterior(
log_p = NULL,
log_g = NULL,
log_liks = NULL,
cores,
save_psis,
...,
log_q = NULL
)
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. |
log_liks |
A log-likelihood matrix of size S * N, where N is the number
of observations and S is the number of samples from q. See
|
cores |
The number of cores to use for parallelization. This defaults to
the option
|
save_psis |
Should the |
log_q |
Deprecated argument name (the same as log_g). |
If log likelihoods are supplied, the function returns a "loo"
object,
otherwise the function returns a "psis"
object.
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 (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
loo()
and psis()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.