| IgnoreIndsKernel {GauPro} | R Documentation |
Kernel R6 class
Description
Kernel R6 class
Kernel R6 class
Usage
k_IgnoreIndsKernel(k, ignoreinds, useC = TRUE)
Arguments
k |
Kernel to use on the non-ignored indices |
ignoreinds |
Indices of columns of X to ignore. |
useC |
Should C code used? Not implemented for IgnoreInds. |
Format
R6Class object.
Value
Object of R6Class with methods for fitting GP model.
Super class
GauPro::GauPro_kernel -> GauPro_kernel_IgnoreInds
Public fields
DNumber of input dimensions of data
kernelKernel to use on indices that aren't ignored
ignoreindsIndices to ignore. For a matrix X, these are the columns to ignore. For example, when those dimensions will be given a different kernel, such as for factors.
Active bindings
s2_estIs s2 being estimated?
s2Value of s2 (variance)
Methods
Public methods
Inherited methods
Method new()
Initialize kernel object
Usage
IgnoreIndsKernel$new(k, ignoreinds, useC = TRUE)
Arguments
kKernel to use on the non-ignored indices
ignoreindsIndices of columns of X to ignore.
useCShould C code used? Not implemented for IgnoreInds.
Method k()
Calculate covariance between two points
Usage
IgnoreIndsKernel$k(x, y = NULL, ...)
Arguments
xvector.
yvector, optional. If excluded, find correlation of x with itself.
...Passed to kernel
Method kone()
Find covariance of two points
Usage
IgnoreIndsKernel$kone(x, y, ...)
Arguments
xvector
yvector
...Passed to kernel
Method dC_dparams()
Derivative of covariance with respect to parameters
Usage
IgnoreIndsKernel$dC_dparams(params = NULL, X, ...)
Arguments
paramsKernel parameters
Xmatrix of points in rows
...Passed to kernel
Method C_dC_dparams()
Calculate covariance matrix and its derivative with respect to parameters
Usage
IgnoreIndsKernel$C_dC_dparams(params = NULL, X, nug)
Arguments
paramsKernel parameters
Xmatrix of points in rows
nugValue of nugget
Method dC_dx()
Derivative of covariance with respect to X
Usage
IgnoreIndsKernel$dC_dx(XX, X, ...)
Arguments
XXmatrix of points
Xmatrix of points to take derivative with respect to
...Additional arguments passed on to the kernel
Method param_optim_start()
Starting point for parameters for optimization
Usage
IgnoreIndsKernel$param_optim_start(...)
Arguments
...Passed to kernel
Method param_optim_start0()
Starting point for parameters for optimization
Usage
IgnoreIndsKernel$param_optim_start0(...)
Arguments
...Passed to kernel
Method param_optim_lower()
Lower bounds of parameters for optimization
Usage
IgnoreIndsKernel$param_optim_lower(...)
Arguments
...Passed to kernel
Method param_optim_upper()
Upper bounds of parameters for optimization
Usage
IgnoreIndsKernel$param_optim_upper(...)
Arguments
...Passed to kernel
Method set_params_from_optim()
Set parameters from optimization output
Usage
IgnoreIndsKernel$set_params_from_optim(...)
Arguments
...Passed to kernel
Method s2_from_params()
Get s2 from params vector
Usage
IgnoreIndsKernel$s2_from_params(...)
Arguments
...Passed to kernel
Method print()
Print this object
Usage
IgnoreIndsKernel$print()
Method clone()
The objects of this class are cloneable with this method.
Usage
IgnoreIndsKernel$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
Examples
kg <- Gaussian$new(D=3)
kig <- GauPro::IgnoreIndsKernel$new(k = Gaussian$new(D=3), ignoreinds = 2)
Xtmp <- as.matrix(expand.grid(1:2, 1:2, 1:2))
cbind(Xtmp, kig$k(Xtmp))
cbind(Xtmp, kg$k(Xtmp))