Last chance! 50% off unlimited learning
Sale ends in
This function calculates the full CF
, CF_crossval
,
SECF
, SECF_crossval
, aSECF
and aSECF_crossval
.
The kernel matrix is automatically computed in all of the above methods, but it is faster to calculate
in advance when using more than one of the above functions and when using any of the crossval functions.
K0_fn(
samples,
derivatives,
sigma,
steinOrder,
kernel_function,
Z = NULL,
nystrom_inds = NULL
)
An nystrom_inds
).
An
An
The tuning parameters of the specified kernel. This involves a single length-scale parameter in "gaussian" and "RQ", a length-scale and a smoothness parameter in "matern" and two parameters in "product" and "prodsim". See below for further details.
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.
Choose between "gaussian", "matern", "RQ", "product" or "prodsim". See below for further details.
(optional) An nystrom_inds
). This can be calculated using squareNorm
.
(optional) The sample indices to be used in the Nystrom approximation (for when using aSECF).
The kernel in Stein-based kernel methods is
The Stein operators for distribution
steinOrder=1
:
steinOrder=2
:
Here
The generic kernels which are implemented in this package are listed below. Note that the input parameter sigma
defines the kernel parameters
"gaussian"
: A Gaussian kernel,
"matern"
: A Matern kernel with
"RQ"
: A rational quadratic kernel,
"product"
: The product kernel that appears in Oates et al (2017) with
"prodsim"
: A slightly different product kernel with
In the above equations, 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).
Leah F. South
Oates, C. J., Girolami, M. & Chopin, N. (2017). Control functionals for Monte Carlo integration. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 79(3), 695-718.
South, L. F., Karvonen, T., Nemeth, C., Girolami, M. and Oates, C. J. (2020). Semi-Exact Control Functionals From Sard's Method. https://arxiv.org/abs/2002.00033