| KernelParameter {BKTR} | R Documentation |
R6 class for kernel's hyperparameter
Description
KernelParameter contains all information and behaviour related to a kernel parameters.
Public fields
valueThe hyperparameter mean's prior value or its constant value
is_fixedSays if the kernel parameter is fixed or not (if fixed, there is no sampling)
lower_boundThe hyperparameter's minimal value during sampling
upper_boundThe hyperparameter's maximal value during sampling
slice_sampling_scaleThe sampling range's amplitude
hparam_precisionPrecision of the hyperparameter
kernelThe kernel associated with the parameter (it is set at kernel instanciation)
nameThe kernel parameter's name
Active bindings
full_nameThe kernel parameter's full name
Methods
Public methods
Method new()
Create a new KernelParameter object.
Usage
KernelParameter$new( value, is_fixed = FALSE, lower_bound = DEFAULT_LBOUND, upper_bound = DEFAULT_UBOUND, slice_sampling_scale = log(10), hparam_precision = 1 )
Arguments
valueNumeric: The hyperparameter mean's prior value (Paper -
\phi) or its constant valueis_fixedBoolean: Says if the kernel parameter is fixed or not (if fixed, there is no sampling)
lower_boundNumeric: Hyperparameter's minimal value during sampling (Paper -
\phi_{min})upper_boundNumeric: Hyperparameter's maximal value during sampling (Paper -
\phi_{max})slice_sampling_scaleNumeric: The sampling range's amplitude (Paper -
\rho)hparam_precisionNumeric: The hyperparameter's precision
Returns
A new KernelParameter object.
Method set_kernel()
Set Kernel for a given KernelParameter object.
Usage
KernelParameter$set_kernel(kernel, param_name)
Arguments
kernelKernel: The kernel to associate with the parameter
param_nameString: The parameter's name
Returns
NULL, set a new kernel for the parameter
Method clone()
The objects of this class are cloneable with this method.
Usage
KernelParameter$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
Examples
# A kernel parameter can be a constant value
const_param <- KernelParameter$new(7, is_fixed = TRUE)
# It can otherwise be sampled and have its value updated through sampling
samp_param <- KernelParameter$new(1, lower_bound = 0.1,
upper_bound = 10, slice_sampling_scale = 4)
# A kernel parameter can be associated with any type of kernel
KernelPeriodic$new(period_length = const_param, lengthscale = samp_param)