GauPro_Gauss {GauPro} | R Documentation |
Corr Gauss GP using inherited optim
Description
Corr Gauss GP using inherited optim
Corr Gauss GP using inherited optim
Format
R6Class
object.
Value
Object of R6Class
with methods for fitting GP model.
Super class
GauPro::GauPro
-> GauPro_Gauss
Public fields
corr
Name of correlation
theta
Correlation parameters
theta_length
Length of theta
theta_map
Map for theta
theta_short
Short vector for theta
separable
Are the dimensions separable?
Methods
Public methods
Inherited methods
GauPro::GauPro$cool1Dplot()
GauPro::GauPro$deviance_searchnug()
GauPro::GauPro$fit()
GauPro::GauPro$grad_norm()
GauPro::GauPro$initialize_GauPr()
GauPro::GauPro$loglikelihood()
GauPro::GauPro$nugget_update()
GauPro::GauPro$optim()
GauPro::GauPro$optimRestart()
GauPro::GauPro$plot()
GauPro::GauPro$plot1D()
GauPro::GauPro$plot2D()
GauPro::GauPro$pred()
GauPro::GauPro$pred_LOO()
GauPro::GauPro$pred_mean()
GauPro::GauPro$pred_meanC()
GauPro::GauPro$pred_one_matrix()
GauPro::GauPro$pred_var()
GauPro::GauPro$predict()
GauPro::GauPro$sample()
GauPro::GauPro$update()
GauPro::GauPro$update_K_and_estimates()
GauPro::GauPro$update_corrparams()
GauPro::GauPro$update_data()
GauPro::GauPro$update_nugget()
Method new()
Create GauPro object
Usage
GauPro_Gauss$new( X, Z, verbose = 0, separable = T, useC = F, useGrad = T, parallel = FALSE, nug = 1e-06, nug.min = 1e-08, nug.est = T, param.est = T, theta = NULL, theta_short = NULL, theta_map = NULL, ... )
Arguments
X
Matrix whose rows are the input points
Z
Output points corresponding to X
verbose
Amount of stuff to print. 0 is little, 2 is a lot.
separable
Are dimensions separable?
useC
Should C code be used when possible? Should be faster.
useGrad
Should the gradient be used?
parallel
Should code be run in parallel? Make optimization faster but uses more computer resources.
nug
Value for the nugget. The starting value if estimating it.
nug.min
Minimum allowable value for the nugget.
nug.est
Should the nugget be estimated?
param.est
Should the kernel parameters be estimated?
theta
Correlation parameters
theta_short
Correlation parameters, not recommended
theta_map
Correlation parameters, not recommended
...
Not used
Method corr_func()
Correlation function
Usage
GauPro_Gauss$corr_func(x, x2 = NULL, theta = self$theta)
Arguments
x
First point
x2
Second point
theta
Correlation parameter
Method deviance_theta()
Calculate deviance
Usage
GauPro_Gauss$deviance_theta(theta)
Arguments
theta
Correlation parameter
Method deviance_theta_log()
Calculate deviance
Usage
GauPro_Gauss$deviance_theta_log(beta)
Arguments
beta
Correlation parameter on log scale
Method deviance()
Calculate deviance
Usage
GauPro_Gauss$deviance(theta = self$theta, nug = self$nug)
Arguments
theta
Correlation parameter
nug
Nugget
Method deviance_grad()
Calculate deviance gradient
Usage
GauPro_Gauss$deviance_grad( theta = NULL, nug = self$nug, joint = NULL, overwhat = if (self$nug.est) "joint" else "theta" )
Arguments
theta
Correlation parameter
nug
Nugget
joint
Calculate over theta and nug at same time?
overwhat
Calculate over theta and nug at same time?
Method deviance_fngr()
Calculate deviance and gradient at same time
Usage
GauPro_Gauss$deviance_fngr( theta = NULL, nug = NULL, overwhat = if (self$nug.est) "joint" else "theta" )
Arguments
theta
Correlation parameter
nug
Nugget
overwhat
Calculate over theta and nug at same time?
joint
Calculate over theta and nug at same time?
Method deviance_log()
Calculate deviance gradient
Usage
GauPro_Gauss$deviance_log(beta = NULL, nug = self$nug, joint = NULL)
Arguments
beta
Correlation parameter on log scale
nug
Nugget
joint
Calculate over theta and nug at same time?
Method deviance_log2()
Calculate deviance on log scale
Usage
GauPro_Gauss$deviance_log2(beta = NULL, lognug = NULL, joint = NULL)
Arguments
beta
Correlation parameter on log scale
lognug
Log of nugget
joint
Calculate over theta and nug at same time?
Method deviance_log_grad()
Calculate deviance gradient on log scale
Usage
GauPro_Gauss$deviance_log_grad( beta = NULL, nug = self$nug, joint = NULL, overwhat = if (self$nug.est) "joint" else "theta" )
Arguments
beta
Correlation parameter
nug
Nugget
joint
Calculate over theta and nug at same time?
overwhat
Calculate over theta and nug at same time?
Method deviance_log2_grad()
Calculate deviance gradient on log scale
Usage
GauPro_Gauss$deviance_log2_grad( beta = NULL, lognug = NULL, joint = NULL, overwhat = if (self$nug.est) "joint" else "theta" )
Arguments
beta
Correlation parameter
lognug
Log of nugget
joint
Calculate over theta and nug at same time?
overwhat
Calculate over theta and nug at same time?
Method deviance_log2_fngr()
Calculate deviance and gradient on log scale
Usage
GauPro_Gauss$deviance_log2_fngr( beta = NULL, lognug = NULL, joint = NULL, overwhat = if (self$nug.est) "joint" else "theta" )
Arguments
beta
Correlation parameter
lognug
Log of nugget
joint
Calculate over theta and nug at same time?
overwhat
Calculate over theta and nug at same time?
Method get_optim_functions()
Get optimization functions
Usage
GauPro_Gauss$get_optim_functions(param_update, nug.update)
Arguments
param_update
Should the parameters be updated?
nug.update
Should the nugget be updated?
Method param_optim_lower()
Lower bound of params
Usage
GauPro_Gauss$param_optim_lower()
Method param_optim_upper()
Upper bound of params
Usage
GauPro_Gauss$param_optim_upper()
Method param_optim_start()
Start value of params for optim
Usage
GauPro_Gauss$param_optim_start()
Method param_optim_start0()
Start value of params for optim
Usage
GauPro_Gauss$param_optim_start0()
Method param_optim_jitter()
Jitter value of params for optim
Usage
GauPro_Gauss$param_optim_jitter(param_value)
Arguments
param_value
param value to add jitter to
Method update_params()
Update value of params after optim
Usage
GauPro_Gauss$update_params(restarts, param_update, nug.update)
Arguments
restarts
Number of restarts
param_update
Are the params being updated?
nug.update
Is the nugget being updated?
Method grad()
Calculate the gradient
Usage
GauPro_Gauss$grad(XX)
Arguments
XX
Points to calculate grad at
Method grad_dist()
Calculate the gradient distribution
Usage
GauPro_Gauss$grad_dist(XX)
Arguments
XX
Points to calculate grad at
Method hessian()
Calculate the hessian
Usage
GauPro_Gauss$hessian(XX, useC = self$useC)
Arguments
XX
Points to calculate grad at
useC
Should C code be used to speed up?
Method print()
Print this object
Usage
GauPro_Gauss$print()
Method clone()
The objects of this class are cloneable with this method.
Usage
GauPro_Gauss$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.
Examples
n <- 12
x <- matrix(seq(0,1,length.out = n), ncol=1)
y <- sin(2*pi*x) + rnorm(n,0,1e-1)
gp <- GauPro_Gauss$new(X=x, Z=y, parallel=FALSE)