Kernel {BKTR} | R Documentation |
Base R6 class for Kernels
Description
Abstract base class for kernels (Should not be instantiated)
Public fields
kernel_variance
The variance of the kernel
jitter_value
The jitter value to add to the kernel matrix
distance_matrix
The distance matrix between points in a tensor format
name
The kernel's name
parameters
The parameters of the kernel (list of
KernelParameter
)covariance_matrix
The covariance matrix of the kernel in a tensor format
positions_df
The positions of the points in a dataframe format
has_dist_matrix
Identify if the kernel has a distance matrix or not
Methods
Public methods
Method new()
Kernel abstract base constructor
Usage
Kernel$new(kernel_variance, jitter_value)
Arguments
kernel_variance
Numeric: The variance of the kernel
jitter_value
Numeric: The jitter value to add to the kernel matrix
Returns
A new Kernel
object.
Method core_kernel_fn()
Abstract method to compute the core kernel's covariance matrix
Usage
Kernel$core_kernel_fn()
Method add_jitter_to_kernel()
Method to add jitter to the kernel's covariance matrix
Usage
Kernel$add_jitter_to_kernel()
Method kernel_gen()
Method to compute the kernel's covariance matrix
Usage
Kernel$kernel_gen()
Method set_positions()
Method to set the kernel's positions and compute the distance matrix
Usage
Kernel$set_positions(positions_df)
Arguments
positions_df
Dataframe: The positions of the points in a dataframe format
Method plot()
Method to plot the kernel's covariance matrix
Usage
Kernel$plot(show_figure = TRUE)
Arguments
show_figure
Boolean: If TRUE, the figure is shown, otherwise it is returned
Returns
If show_figure
is TRUE, the figure is shown, otherwise it is returned
Method clone()
The objects of this class are cloneable with this method.
Usage
Kernel$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.