| KernelPeriodic {BKTR} | R Documentation |
R6 class for Periodic Kernels
Description
R6 class for Periodic Kernels
Super class
BKTR::Kernel -> KernelPeriodic
Public fields
lengthscaleThe lengthscale parameter instance of the kernel
period_lengthThe period length parameter instance of the kernel
has_dist_matrixIdentify if the kernel has a distance matrix or not
nameThe kernel's name
Methods
Public methods
Inherited methods
Method new()
Create a new KernelPeriodic object.
Usage
KernelPeriodic$new( lengthscale = KernelParameter$new(2), period_length = KernelParameter$new(2), kernel_variance = 1, jitter_value = NULL )
Arguments
lengthscaleKernelParameter: The lengthscale parameter instance of the kernel
period_lengthKernelParameter: The period length parameter instance of the kernel
kernel_varianceNumeric: The variance of the kernel
jitter_valueNumeric: The jitter value to add to the kernel matrix
Returns
A new KernelPeriodic object.
Method core_kernel_fn()
Method to compute the core kernel's covariance matrix
Usage
KernelPeriodic$core_kernel_fn()
Returns
The core kernel's covariance matrix
Method clone()
The objects of this class are cloneable with this method.
Usage
KernelPeriodic$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
Examples
# Create a new Periodic kernel
k_periodic <- KernelPeriodic$new()
# Set the kernel's positions
positions_df <- data.frame(x=c(-4, 0, 3), y=c(-2, 0, 2))
k_periodic$set_positions(positions_df)
# Generate the kernel's covariance matrix
k_periodic$kernel_gen()
[Package BKTR version 0.1.1 Index]