evidence: Evidence estimation with ZV-CV

Description Usage Arguments Value On the choice of σ, the kernel and the Stein order Author(s) References See Also

Description

The functions evidence_CTI and evidence_CTI_CF can be used to improve upon the thermodynamic integration (TI) estimate of the normalising constant with ZV-CV and CF, respectively. The functions evidence_SMC and evidence_SMC_CF do the same thing for the sequential Monte Carlo (SMC) normalising constant identity.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
evidence_CTI(
  samples,
  loglike,
  der_loglike,
  der_logprior,
  temperatures,
  temperatures_all,
  most_recent,
  est_inds,
  options,
  folds = 5
)

evidence_CTI_CF(
  samples,
  loglike,
  der_loglike,
  der_logprior,
  temperatures,
  temperatures_all,
  most_recent,
  est_inds,
  steinOrder,
  kernel_function,
  sigma_list,
  folds = 5
)

evidence_SMC(
  samples,
  loglike,
  der_loglike,
  der_logprior,
  temperatures,
  temperatures_all,
  most_recent,
  est_inds,
  options,
  folds = 5
)

evidence_SMC_CF(
  samples,
  loglike,
  der_loglike,
  der_logprior,
  temperatures,
  temperatures_all,
  most_recent,
  est_inds,
  steinOrder,
  kernel_function,
  sigma_list,
  folds = 5
)

Arguments

samples

An N by d by T matrix of samples from the T power posteriors, where N is the number of samples and d is the dimension of the target distribution

loglike

An N by T matrix of log likelihood values corresponding to samples

der_loglike

An N by d by T matrix of the derivatives of the log likelihood with respect to the parameters, with parameter values corresponding to samples

der_logprior

An N by d by T matrix of the derivatives of the log prior with respect to the parameters, with parameter values corresponding to samples

temperatures

A vector of length T of temperatures for the power posterior temperatures

temperatures_all

An adjusted vector of length tau of temperatures. Better performance should be obtained with a more conservative temperature schedule. See Expand_Temperatures for a function to adjust the temperatures.

most_recent

A vector of length tau which gives the indices in the original temperatures that the new temperatures correspond to.

est_inds

(optional) A vector of indices for the estimation-only samples. The default when est_inds is missing or NULL is to perform both estimation of the control variates and evaluation of the integral using all samples. Otherwise, the samples from est_inds are used in estimating the control variates and the remainder are used in evaluating the integral. Splitting the indices in this way can be used to reduce bias from adaption and to make computation feasible for very large sample sizes (small est_inds is faster), but in general in will increase the variance of the estimator.

options

A list of control variate specifications for ZV-CV. This can be a single list containing the elements below (the defaults are used for elements which are not specified). Alternatively, it can be a list of lists containing any or all of the elements below. Where the latter is used, the function zvcv automatically selects the best performing option based on cross-validation.

folds

The number of folds used in k-fold cross-validation for selecting the optimal control variate. For ZV-CV, this may include selection of the optimal polynomial order, regression type and subset of parameters depending on options. For CF, this includes the selection of the optimal tuning parameters in sigma_list. The default is five.

steinOrder

(optional) This is the order of the Stein operator. The default is 1 in the control functionals paper (Oates et al, 2017) and 2 in the semi-exact control functionals paper (South et al, 2020). The following values are currently available: 1 for all kernels and 2 for "gaussian", "matern" and "RQ". See below for further details.

kernel_function

(optional) Choose between "gaussian", "matern", "RQ", "product" or "prodsim". See below for further details.

sigma_list

(optional between this and K0_list) A list of tuning parameters for the specified kernel. This involves a list of single length-scale parameter in "gaussian" and "RQ", a list of vectors containing length-scale and smoothness parameters in "matern" and a list of vectors of the two parameters in "product" and "prodsim". See below for further details. When sigma_list is specified and not K0_list, the K0 matrix is computed twice for each selected tuning parameter.

Value

The function evidence_CTI returns a list, containing the following components:

The function evidence_CTI_CF returns a list, containing the following components:

The function evidence_SMC returns a list, containing the following components:

The function evidence_SMC_CF returns a list, containing the following components:

On the choice of σ, the kernel and the Stein order

The kernel in Stein-based kernel methods is L_x L_y k(x,y) where L_x is a first or second order Stein operator in x and k(x,y) is some generic kernel to be specified.

The Stein operators for distribution p(x) are defined as:

Here \nabla_x is the first order derivative wrt x and Δ_x = \nabla_x^T \nabla_x is the Laplacian operator.

The generic kernels which are implemented in this package are listed below. Note that the input parameter sigma defines the kernel parameters σ.

In the above equations, z(x) = ∑_j x[j]^2 and z(x,y) = ∑_j (x[j] - y[j])^2. For the last two kernels, the code only has implementations for steinOrder=1. Each combination of steinOrder and kernel_function above is currently hard-coded but it may be possible to extend this to other kernels in future versions using autodiff. The calculations for the first three kernels above are detailed in South et al (2020).

Author(s)

Leah F. South

References

Mira, A., Solgi, R., & Imparato, D. (2013). Zero variance Markov chain Monte Carlo for Bayesian estimators. Statistics and Computing, 23(5), 653-662.

South, L. F., Oates, C. J., Mira, A., & Drovandi, C. (2019). Regularised zero variance control variates for high-dimensional variance reduction. https://arxiv.org/abs/1811.05073

See Also

See an example at VDP and see ZVCV for more package details. See Expand_Temperatures for a function that can be used to find stricter (or less stricter) temperature schedules based on the conditional effective sample size.


ZVCV documentation built on July 2, 2020, 2:38 a.m.

Related to evidence in ZVCV...