KernelAddComposed | R Documentation |
R6 class automatically generated when adding two kernels together.
BKTR::Kernel
-> BKTR::KernelComposed
-> KernelAddComposed
new()
Create a new KernelAddComposed
object.
KernelAddComposed$new(left_kernel, right_kernel, new_name)
left_kernel
Kernel: The left kernel to use for composition
right_kernel
Kernel: The right kernel to use for composition
new_name
String: The name of the composed kernel
A new KernelAddComposed
object.
clone()
The objects of this class are cloneable with this method.
KernelAddComposed$clone(deep = FALSE)
deep
Whether to make a deep clone.
# Create a new additive kernel
k_rq_plus_per <- KernelAddComposed$new(
left_kernel = KernelRQ$new(),
right_kernel = KernelPeriodic$new(),
new_name = 'SE + Periodic Kernel'
)
# Set the kernel's positions
positions_df <- data.frame(x=c(-4, 0, 3), y=c(-2, 0, 2))
k_rq_plus_per$set_positions(positions_df)
# Generate the kernel's covariance matrix
k_rq_plus_per$kernel_gen()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.