Description Usage Arguments Value Author(s) Examples
Compute the 2D Gaussian kernel matrix for "lineqGP"
models.
attr: "gradient".
1 | k2gaussian(x1, x2, par, d = 2)
|
x1 |
a matrix with the first couple of input locations. |
x2 |
a matrix with the second couple of input locations. |
par |
the values of the kernel parameters (variance, lengthscales). |
d |
a number corresponding to the dimension of the input space. |
Kernel matrix K(x1,x2) (or K(x1,x1) if x2 is not defined).
A. F. Lopez-Lopera.
1 2 3 4 | xgrid <- seq(0, 1, 0.1)
x <- as.matrix(expand.grid(xgrid, xgrid))
K <- k2gaussian(x, x, par = c(1, 0.1))
image(K, main = "covariance matrix using a 2D Gaussian kernel")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.