Skip to contents

Create a rational-quadratic kernel specification

Usage

rational_quadratic_kernel(variance = 1, length_scale = 1, alpha = 1)

Arguments

variance

Positive marginal variance.

length_scale

Positive scalar or numeric vector. A vector supplies one ARD length scale per input dimension and is validated against the data when the kernel is evaluated.

alpha

Positive scale-mixture parameter.

Value

An object of class gaussianprocesses_kernel.

Stability

Stable: from version 1.0.0 this interface changes incompatibly only in a major release, after a deprecation period. Results and options that concern an experimental model class, kernel, or argument follow that interface's tier. See gaussianprocesses-package for the policy.

See also

kernel_rational_quadratic() computes the same covariance directly from parameter values, without a kernel specification.

Examples

kernel <- rational_quadratic_kernel(length_scale = 0.8, alpha = 2)
evaluate_kernel(kernel, c(0, 0.5, 1))
#>           [,1]      [,2]      [,3]
#> [1,] 1.0000000 0.8299794 0.5171064
#> [2,] 0.8299794 1.0000000 0.8299794
#> [3,] 0.5171064 0.8299794 1.0000000