| 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
corrName of correlation
thetaCorrelation parameters
theta_lengthLength of theta
theta_mapMap for theta
theta_shortShort vector for theta
separableAre 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
XMatrix whose rows are the input points
ZOutput points corresponding to X
verboseAmount of stuff to print. 0 is little, 2 is a lot.
separableAre dimensions separable?
useCShould C code be used when possible? Should be faster.
useGradShould the gradient be used?
parallelShould code be run in parallel? Make optimization faster but uses more computer resources.
nugValue for the nugget. The starting value if estimating it.
nug.minMinimum allowable value for the nugget.
nug.estShould the nugget be estimated?
param.estShould the kernel parameters be estimated?
thetaCorrelation parameters
theta_shortCorrelation parameters, not recommended
theta_mapCorrelation parameters, not recommended
...Not used
Method corr_func()
Correlation function
Usage
GauPro_Gauss$corr_func(x, x2 = NULL, theta = self$theta)
Arguments
xFirst point
x2Second point
thetaCorrelation parameter
Method deviance_theta()
Calculate deviance
Usage
GauPro_Gauss$deviance_theta(theta)
Arguments
thetaCorrelation parameter
Method deviance_theta_log()
Calculate deviance
Usage
GauPro_Gauss$deviance_theta_log(beta)
Arguments
betaCorrelation parameter on log scale
Method deviance()
Calculate deviance
Usage
GauPro_Gauss$deviance(theta = self$theta, nug = self$nug)
Arguments
thetaCorrelation parameter
nugNugget
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
thetaCorrelation parameter
nugNugget
jointCalculate over theta and nug at same time?
overwhatCalculate 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
thetaCorrelation parameter
nugNugget
overwhatCalculate over theta and nug at same time?
jointCalculate 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
betaCorrelation parameter on log scale
nugNugget
jointCalculate 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
betaCorrelation parameter on log scale
lognugLog of nugget
jointCalculate 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
betaCorrelation parameter
nugNugget
jointCalculate over theta and nug at same time?
overwhatCalculate 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
betaCorrelation parameter
lognugLog of nugget
jointCalculate over theta and nug at same time?
overwhatCalculate 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
betaCorrelation parameter
lognugLog of nugget
jointCalculate over theta and nug at same time?
overwhatCalculate 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_updateShould the parameters be updated?
nug.updateShould 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_valueparam 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
restartsNumber of restarts
param_updateAre the params being updated?
nug.updateIs the nugget being updated?
Method grad()
Calculate the gradient
Usage
GauPro_Gauss$grad(XX)
Arguments
XXPoints to calculate grad at
Method grad_dist()
Calculate the gradient distribution
Usage
GauPro_Gauss$grad_dist(XX)
Arguments
XXPoints to calculate grad at
Method hessian()
Calculate the hessian
Usage
GauPro_Gauss$hessian(XX, useC = self$useC)
Arguments
XXPoints to calculate grad at
useCShould 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
deepWhether 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)