| kernel_ec | R Documentation |
This function computes one of the isotropic kernels listed below. Note that kernel() is deprecated, please use kernel_ec() instead.
Unlike kernel_symm_ec, these kernels are only defined when x \geq 0. They are used as
kernel multipliers in estimators corrected_est and kernel_est.
kernel_ec(
x,
name = c("gaussian", "exponential", "wave", "rational_quadratic", "spherical",
"circular", "bessel_j", "matern", "cauchy"),
params = c(1)
)
x |
A vector or matrix of arguments of at least length 1 for which the kernel is computed at. |
name |
The name of the kernel. Options are: gaussian, exponential, wave, rational_quadratic, spherical, circular, bessel_j, matern, and cauchy. |
params |
A vector of parameters for the kernel. See the documentation below for the position of the parameters. All kernels have a scale parameter as the first value in the vector. |
Gaussian Kernel.
The isotropic Gaussian kernel, which is positive-definite for {R}^{d}, d \in N, is defined as
a(x;\theta) = \exp(-x^{2} / \theta), \theta > 0 .
The params argument is of the form c(\theta).
Exponential Kernel.
The isotropic exponential kernel, which is positive-definite for {R}^{d}, d \in N, is defined as
a(x;\theta) = \exp(-x / \theta) , \theta > 0 .
The params argument is of the form c(\theta).
Isotropic Wave (Cardinal Sine) Kernel.
The isotropic wave (cardinal sine) kernel, which is positive-definite for {R}^{d}, d \leq 3, is given by
a(x;\theta) = \left\{ \begin{array}{ll}
\frac{\theta}{x} \sin\left( \frac{x}{\theta} \right), & x \neq 0 \\
1, & x = 0
\end{array} \right.
where \theta > 0 .
The params argument is of the form c(\theta).
Isotropic Rational Quadratic Kernel.
The isotropic rational quadratic kernel, which is positive-definite for {R}^{d}, d \in N, is defined as
a(x;\theta) = \frac{\theta}{x^{2} + \theta} , \theta > 0 .
The params argument is of the form c(\theta).
Isotropic Spherical Kernel.
The isotropic spherical kernel, which is positive-definite for {R}^{3}, d \leq 3, is given by
a(x;\theta) = \left\{
\begin{array}{ll}
1 - \frac{3}{2}\frac{x}{\theta} + \frac{1}{2}\left( \frac{x}{\theta} \right)^{3}, & x < \theta \\
0, & \mbox{otherwise}
\end{array} \right.
where \theta > 0 .
The params argument is of the form c(\theta).
Isotropic Circular Kernel.
The isotropic circular kernel, which is positive-definite for {R}^{d}, d \leq 2, is given by
a(x;\theta) = \left\{
\begin{array}{ll}
\frac{2}{\pi}\arccos\left( \frac{x}{\theta} \right) - \frac{2}{\pi}\frac{x}{\theta} \sqrt{ 1 - \left( \frac{x}{\theta} \right)^{2} }, & x < \theta \\
0, & \mbox{otherwise}
\end{array} \right.
where \theta > 0 .
The params argument is of the form c(\theta).
Isotropic Matérn Kernel.
The isotropic Matérn kernel, which is positive-definite for {R}^{d}, d \in N, and when \nu > 0, is defined as
a(x; \theta, \nu) = \left(\sqrt{2\nu} \frac{x}{\theta} \right)^{\nu} \left(2^{\nu - 1} \Gamma(\nu) \right)^{-1} K_{\nu}\left( \sqrt{2\nu} \frac{x}{\theta} \right) ,
where \theta > 0 and K_{\nu}(\cdot) is the modified Bessel function of the second kind.
The params argument is of the form c(\theta, \nu).
Isotropic Bessel Kernel.
The isotropic Bessel kernel, which is positive-definite for {R}^{d}, d \in N, and when \nu \geq \frac{d}{2} - 1, is given by
a(x; \theta, \nu) = 2^{\nu} \Gamma(\nu + 1) J_{\nu}(x / \theta) (x / \theta)^{-\nu} ,
where \theta > 0 and J_{\nu}(\cdot) is the Bessel function of the first kind.
The params argument is of the form c(\theta, \nu, d ).
Isotropic Cauchy Kernel.
The isotropic Cauchy kernel, which is positive-definite for {R}^{d}, d \in N, and when 0 < \alpha \leq 2 and \beta \geq 0, is defined by
a(x ; \theta, \alpha, \beta) = (1 + (x / \theta)^{\alpha})^{-(\beta / \alpha)} , \theta > 0 .
The params argument is of the form c(\theta, \alpha, \beta ).
A vector or matrix of kernel values.
Genton, M. (2001). Classes of Kernels for Machine Learning: A Statistics Perspective. Journal of Machine Learning Research. 2, 299-312. https://doi.org/10.1162/15324430260185646
Table 4.2 in Hristopulos, D. T. (2020). Random Fields for Spatial Data Modeling: A Primer for Scientists and Engineers. Springer. https://doi.org/10.1007/978-94-024-1918-4
x <- c(0.2, 0.4, 0.6)
theta <- 0.9
kernel_ec(x, "gaussian", c(theta))
kernel_ec(x, "exponential", c(theta))
kernel_ec(x, "wave", c(theta))
kernel_ec(x, "rational_quadratic", c(theta))
kernel_ec(x, "spherical", c(theta))
kernel_ec(x, "circular", c(theta))
nu <- 1
kernel_ec(x, "matern", c(theta, nu))
dim <- 1
kernel_ec(x, "bessel_j", c(theta, nu, dim))
alpha <- 1
beta <- 2
kernel_ec(x, "cauchy", c(theta, alpha, beta))
curve(kernel_ec(x, "gaussian", c(theta)), from = 0, to = 5)
curve(kernel_ec(x, "exponential", c(theta)), from = 0, to = 5)
curve(kernel_ec(x, "wave", c(theta)), from = 0, to = 5)
curve(kernel_ec(x, "rational_quadratic", c(theta)), from = 0, to = 5)
curve(kernel_ec(x, "spherical", c(theta)), from = 0, to = 5)
curve(kernel_ec(x, "circular", c(theta)), from = 0, to = 5)
curve(kernel_ec(x, "matern", c(theta, nu)), from = 0, to = 5)
curve(kernel_ec(x, "bessel_j", c(theta, nu, dim)), from = 0, to = 5)
curve(kernel_ec(x, "cauchy", c(theta, alpha, beta)), from = 0, to = 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.