| Kernel {BKTR} | R Documentation |
Base R6 class for Kernels
Description
Abstract base class for kernels (Should not be instantiated)
Public fields
kernel_varianceThe variance of the kernel
jitter_valueThe jitter value to add to the kernel matrix
distance_matrixThe distance matrix between points in a tensor format
nameThe kernel's name
parametersThe parameters of the kernel (list of
KernelParameter)covariance_matrixThe covariance matrix of the kernel in a tensor format
positions_dfThe positions of the points in a dataframe format
has_dist_matrixIdentify 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_varianceNumeric: The variance of the kernel
jitter_valueNumeric: 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_dfDataframe: 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_figureBoolean: 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
deepWhether to make a deep clone.