KernelMulComposed {BKTR} | R Documentation |
R6 class for Kernels Composed via Multiplication
Description
R6 class automatically generated when multiplying two kernels together.
Super classes
BKTR::Kernel
-> BKTR::KernelComposed
-> KernelMulComposed
Methods
Public methods
Inherited methods
Method new()
Create a new KernelMulComposed
object.
Usage
KernelMulComposed$new(left_kernel, right_kernel, new_name)
Arguments
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
Returns
A new KernelMulComposed
object.
Method clone()
The objects of this class are cloneable with this method.
Usage
KernelMulComposed$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.
Examples
# Create a new locally periodic kernel
k_loc_per <- KernelMulComposed$new(
left_kernel = KernelSE$new(),
right_kernel = KernelPeriodic$new(),
new_name = 'Locally Periodic Kernel'
)
# Set the kernel's positions
positions_df <- data.frame(x=c(-4, 0, 3), y=c(-2, 0, 2))
k_loc_per$set_positions(positions_df)
# Generate the kernel's covariance matrix
k_loc_per$kernel_gen()
[Package BKTR version 0.1.1 Index]