exp_quad_kernel: The Exponentiated Quadratic kernel

View source: R/kernels.R

exp_quad_kernelR Documentation

The Exponentiated Quadratic kernel

Description

Computes

amplitude^2 * \exp ( - d^2 / 2 * length_scale )

where d ≥ 0 is the distance between any two points in space for amplitude > 0 and length_scale > 0.

Usage

exp_quad_kernel(d, amplitude, length_scale, perform_checks = TRUE)

Arguments

d

A set of non-negative real numbers. Pairwise distances between points.

amplitude

A positive real number. The amplitude of the Gaussian process.

length_scale

A positive real number. The length-scale of the Gaussian process.

perform_checks

Logical. Check if function inputs are specified correctly.

Value

An array of positive values between 0 and amplitude with the same dimension as d.

Examples

x <- 1:10
d <- abs(outer(x, x, "-"))
K <- exp_quad_kernel(d, amplitude = 1, length_scale = 2)

jpmeagher/vbar documentation built on Nov. 22, 2022, 5:48 a.m.