Learn R Programming

lineqGPR (version 0.1.1)

k1exponential: 1D Exponential Kernel Matrix for "lineqGP" Models.

Description

Compute the 1D Exponential kernel for "lineqGP" models. attr: "gradient".

Usage

k1exponential(x1, x2, par, d = 1)

Arguments

x1

a vector with the first input locations.

x2

a vector with the second input locations.

par

the values of the kernel parameters (variance, lengthscale).

d

a number corresponding to the dimension of the input space.

Value

Kernel matrix \(K(x_1,x_2)\) (or \(K(x_1,x_1)\) if \(x_2\) is not defined).

Examples

Run this code
# NOT RUN {
x <- seq(0, 1, 0.01)
K <- k1exponential(x, x, par =  c(1, 0.1))
image(K, main = "covariance matrix using a Exponential kernel")

# }

Run the code above in your browser using DataLab