| KernelComposed | R Documentation |
R6 class for Composed Kernels
BKTR::Kernel -> KernelComposed
nameThe kernel's name
parametersThe parameters of the kernel (list of KernelParameter)
left_kernelThe left kernel to use for composition
right_kernelThe right kernel to use for composition
composition_operationThe operation to use for composition
has_dist_matrixIdentify if the kernel has a distance matrix or not
new()Create a new KernelComposed object.
KernelComposed$new(left_kernel, right_kernel, new_name, composition_operation)
left_kernelKernel: The left kernel to use for composition
right_kernelKernel: The right kernel to use for composition
new_nameString: The name of the composed kernel
composition_operationCompositionOps: The operation to use for composition
core_kernel_fn()Method to compute the core kernel's covariance matrix
KernelComposed$core_kernel_fn()
The core kernel's covariance matrix
set_positions()Method to set the kernel's positions and compute the distance matrix
KernelComposed$set_positions(positions_df)
positions_dfDataframe: The positions of the points in a dataframe format
NULL, set the kernel's positions and compute the distance matrix
clone()The objects of this class are cloneable with this method.
KernelComposed$clone(deep = FALSE)
deepWhether to make a deep clone.
# Create a new locally periodic kernel
k_loc_per <- KernelComposed$new(
left_kernel = KernelSE$new(),
right_kernel = KernelPeriodic$new(),
new_name = 'Locally Periodic Kernel',
composition_operation = CompositionOps$MUL
)
# 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()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.