kernel_product: Gaussian Kernel R6 class

kernel_productR Documentation

Gaussian Kernel R6 class

Description

Gaussian Kernel R6 class

Gaussian Kernel R6 class

Format

R6Class object.

Value

Object of R6Class with methods for fitting GP model.

Super class

GauPro::GauPro_kernel -> GauPro_kernel_product

Public fields

k1

kernel 1

k2

kernel 2

s2

Variance

Active bindings

k1pl

param length of kernel 1

k2pl

param length of kernel 2

s2_est

Is s2 being estimated?

Methods

Public methods

Inherited methods

Method new()

Is s2 being estimated?

Length of the parameters of k1

Length of the parameters of k2

Initialize kernel

Usage
kernel_product$new(k1, k2, useC = TRUE)
Arguments
k1

Kernel 1

k2

Kernel 2

useC

Should C code used? Not applicable for kernel product.


Method k()

Calculate covariance between two points

Usage
kernel_product$k(x, y = NULL, params, ...)
Arguments
x

vector.

y

vector, optional. If excluded, find correlation of x with itself.

params

parameters to use instead of beta and s2.

...

Not used


Method param_optim_start()

Starting point for parameters for optimization

Usage
kernel_product$param_optim_start(jitter = F, y)
Arguments
jitter

Should there be a jitter?

y

Output


Method param_optim_start0()

Starting point for parameters for optimization

Usage
kernel_product$param_optim_start0(jitter = F, y)
Arguments
jitter

Should there be a jitter?

y

Output


Method param_optim_lower()

Lower bounds of parameters for optimization

Usage
kernel_product$param_optim_lower()

Method param_optim_upper()

Upper bounds of parameters for optimization

Usage
kernel_product$param_optim_upper()

Method set_params_from_optim()

Set parameters from optimization output

Usage
kernel_product$set_params_from_optim(optim_out)
Arguments
optim_out

Output from optimization


Method dC_dparams()

Derivative of covariance with respect to parameters

Usage
kernel_product$dC_dparams(params = NULL, C, X, C_nonug, nug)
Arguments
params

Kernel parameters

C

Covariance with nugget

X

matrix of points in rows

C_nonug

Covariance without nugget added to diagonal

nug

Value of nugget


Method C_dC_dparams()

Calculate covariance matrix and its derivative with respect to parameters

Usage
kernel_product$C_dC_dparams(params = NULL, X, nug)
Arguments
params

Kernel parameters

X

matrix of points in rows

nug

Value of nugget


Method dC_dx()

Derivative of covariance with respect to X

Usage
kernel_product$dC_dx(XX, X)
Arguments
XX

matrix of points

X

matrix of points to take derivative with respect to


Method s2_from_params()

Get s2 from params vector

Usage
kernel_product$s2_from_params(params, s2_est = self$s2_est)
Arguments
params

parameter vector

s2_est

Is s2 being estimated?


Method print()

Print this object

Usage
kernel_product$print()

Method clone()

The objects of this class are cloneable with this method.

Usage
kernel_product$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Examples

k1 <- Exponential$new(beta=1)
k2 <- Matern32$new(beta=2)
k <- k1 * k2
k$k(matrix(c(2,1), ncol=1))

CollinErickson/GauPro documentation built on March 25, 2024, 11:20 p.m.