KernelParameter {BKTR}R Documentation

R6 class for kernel's hyperparameter

Description

KernelParameter contains all information and behaviour related to a kernel parameters.

Public fields

value

The hyperparameter mean's prior value or its constant value

is_fixed

Says if the kernel parameter is fixed or not (if fixed, there is no sampling)

lower_bound

The hyperparameter's minimal value during sampling

upper_bound

The hyperparameter's maximal value during sampling

slice_sampling_scale

The sampling range's amplitude

hparam_precision

Precision of the hyperparameter

kernel

The kernel associated with the parameter (it is set at kernel instanciation)

name

The kernel parameter's name

Active bindings

full_name

The 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
value

Numeric: The hyperparameter mean's prior value (Paper - \phi) or its constant value

is_fixed

Boolean: Says if the kernel parameter is fixed or not (if fixed, there is no sampling)

lower_bound

Numeric: Hyperparameter's minimal value during sampling (Paper - \phi_{min})

upper_bound

Numeric: Hyperparameter's maximal value during sampling (Paper - \phi_{max})

slice_sampling_scale

Numeric: The sampling range's amplitude (Paper - \rho)

hparam_precision

Numeric: 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
kernel

Kernel: The kernel to associate with the parameter

param_name

String: 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
deep

Whether 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)


[Package BKTR version 0.1.1 Index]