Skip to contents

The covariance matrices generated by all supplied kernels are added element-wise.

Usage

sum_kernel(...)

Arguments

...

Two or more Gaussian-process kernel specifications.

Value

A composite kernel specification.

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.

Examples

kernel <- sum_kernel(linear_kernel(variance = 0.1), periodic_kernel(period = 12))
kernel
#> SumKernel(
#>   Linear(variance=0.1)
#>   Periodic(variance=1, length_scale=1, period=12)
#> )

names(kernel_parameters(kernel, flatten = TRUE))
#> [1] "kernel1.variance"     "kernel2.variance"     "kernel2.length_scale"
#> [4] "kernel2.period"