Description Usage Arguments Details Value Note Author(s) References Examples
One-dimensional classical covariance kernel Functions.
1 2 3 4 5 6 7 8 9 10 11 12 | k1FunExp(x1, x2, par)
k1FunGauss(x1, x2, par)
k1FunPowExp(x1, x2, par)
k1FunMatern3_2(x1, x2, par)
k1FunMatern5_2(x1, x2, par)
k1Fun1Cos(x)
k1Fun1Exp(x)
k1Fun1Gauss(x)
k1Fun1PowExp(x, alpha = 1.5)
k1Fun1Matern3_2(x)
k1Fun1Matern5_2(x)
|
x1 |
First location vector. |
x2 |
Second location vector. Must have the same length as |
x |
For stationary covariance functions, the vector containing difference
of positions: |
alpha |
Regularity parameter in (0, 2] for Power Exponential covariance function. |
par |
Vector of parameters. The length and the meaning of the elements in
this vector depend on the chosen kernel. The first parameter is the
range parameter (if there is one), the last is the variance. So the
shape parameter of |
These kernel functions are described in the Roustant et al (2012), table 1 p. 8. More details are given in chap. 4 of Rasmussen et al (2006).
A matrix with a "gradient"
attribute. This matrix has n_1
rows and n_2 columns where n_1 and n_2 are the
length of x1
and x2
. If x1
and x2
have
length 1, the attribute is a vector of the same length p as
par
and gives the derivative of the kernel with respect to the
parameters in the same order. If x1
or x2
have length
> 1, the attribute is an array with dimension (n_1, n_2,
p).
The kernel functions are coded in C through the .Call
interface
and are mainly intended for internal use. They are used by the
covTS
class.
Be aware that very few checks are done (length of objects, order of the parameters, ...).
Oivier Roustant, David Ginsbourger, Yves Deville
C.E. Rasmussen and C.K.I. Williams (2006), Gaussian Processes for Machine Learning, the MIT Press, http://www.GaussianProcess.org/gpml/
O. Roustant, D. Ginsbourger, Y. Deville (2012). "DiceKriging, DiceOptim: Two R Packages for the Analysis of Computer Experiments by Kriging-Based Metamodeling and Optimization." Journal of Statistical Software, 51(1), 1-55. https://www.jstatsoft.org/v51/i01/
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## show the functions
n <- 300
x0 <- 0
x <- seq(from = 0, to = 3, length.out = n)
kExpVal <- k1FunExp(x0, x, par = c(range = 1, var = 2))
kGaussVal <- k1FunGauss(x0, x, par = c(range = 1, var = 2))
kPowExpVal <- k1FunPowExp(x0, x, par = c(range = 1, shape = 1.5, var = 2))
kMatern3_2Val <- k1FunMatern3_2(x0, x, par = c(range = 1, var = 2))
kMatern5_2Val <- k1FunMatern5_2(x0, x, par = c(range = 1, var = 2))
kerns <- cbind(as.vector(kExpVal), as.vector(kGaussVal), as.vector(kPowExpVal),
as.vector(kMatern3_2Val), as.vector(kMatern5_2Val))
matplot(x, kerns, type = "l", main = "five 'kergp' 1d-kernels", lwd = 2)
## extract gradient
head(attr(kPowExpVal, "gradient"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.