View source: R/split_moment_matching.R
loo_moment_match_split | R Documentation |
A function that computes the split moment matching importance sampling loo. Takes in the moment matching total transformation, transforms only half of the draws, and computes a single elpd using multiple importance sampling.
loo_moment_match_split(
x,
upars,
cov,
total_shift,
total_scaling,
total_mapping,
i,
log_prob_upars,
log_lik_i_upars,
r_eff_i,
cores,
is_method,
...
)
x |
A fitted model object. |
upars |
A matrix containing the model parameters in unconstrained space where they can have any real value. |
cov |
Logical; Indicate whether to match the covariance matrix of the
samples or not. If |
total_shift |
A vector representing the total shift made by the moment matching algorithm. |
total_scaling |
A vector representing the total scaling of marginal variance made by the moment matching algorithm. |
total_mapping |
A vector representing the total covariance transformation made by the moment matching algorithm. |
i |
Observation index. |
log_prob_upars |
A function that takes arguments |
log_lik_i_upars |
A function that takes arguments |
r_eff_i |
MCMC relative effective sample size of the |
cores |
The number of cores to use for parallelization. This defaults to
the option
|
is_method |
The importance sampling method to use. The following methods are implemented:
|
... |
Further arguments passed to the custom functions documented above. |
A list containing the updated log-importance weights and log-likelihood values. Also returns the updated MCMC effective sample size and the integrand-specific log-importance weights.
Paananen, T., Piironen, J., Buerkner, P.-C., Vehtari, A. (2021). Implicitly adaptive importance sampling. Statistics and Computing, 31, 16. doi:10.1007/s11222-020-09982-2. arXiv preprint arXiv:1906.08850.
loo()
, loo_moment_match()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.