Class providing object with methods for fitting a GP model
Class providing object with methods for fitting a GP model
Object of R6Class
with methods for fitting GP model.
R6Class
object.
new(X, Z, corr="Gauss", verbose=0, separable=T, useC=F,useGrad=T,
parallel=T, nug.est=T, ...)
This method is used to create object of this class with X
and Z
as the data.
update(Xnew=NULL, Znew=NULL, Xall=NULL, Zall=NULL,
restarts = 5,
param_update = T, nug.update = self$nug.est)
This method updates the model, adding new data if given, then running optimization again.
X
Design matrix
Z
Responses
N
Number of data points
D
Dimension of data
corr
Type of correlation function
nug.min
Minimum value of nugget
nug
Value of the nugget, is estimated unless told otherwise
separable
Are the dimensions separable?
verbose
0 means nothing printed, 1 prints some, 2 prints most.
useGrad
Should grad be used?
useC
Should C code be used?
parallel
Should the code be run in parallel?
parallel_cores
How many cores are there? It will self detect, do not set yourself.
corr
Type of correlation function
separable
Are the dimensions separable?
corr_func()
GauPro_base$corr_func(...)
new()
GauPro_base$new( X, Z, verbose = 0, useC = F, useGrad = T, parallel = FALSE, nug = 1e-06, nug.min = 1e-08, nug.est = T, param.est = TRUE, ... )
initialize_GauPr()
GauPro_base$initialize_GauPr()
fit()
GauPro_base$fit(X, Z)
update_K_and_estimates()
GauPro_base$update_K_and_estimates()
predict()
GauPro_base$predict(XX, se.fit = F, covmat = F, split_speed = T)
pred()
GauPro_base$pred(XX, se.fit = F, covmat = F, split_speed = T)
pred_one_matrix()
GauPro_base$pred_one_matrix(XX, se.fit = F, covmat = F)
pred_mean()
GauPro_base$pred_mean(XX, kx.xx)
pred_meanC()
GauPro_base$pred_meanC(XX, kx.xx)
pred_var()
GauPro_base$pred_var(XX, kxx, kx.xx, covmat = F)
pred_LOO()
GauPro_base$pred_LOO(se.fit = FALSE)
cool1Dplot()
GauPro_base$cool1Dplot( n2 = 20, nn = 201, col2 = "gray", xlab = "x", ylab = "y", xmin = NULL, xmax = NULL, ymin = NULL, ymax = NULL )
plot1D()
GauPro_base$plot1D( n2 = 20, nn = 201, col2 = 2, xlab = "x", ylab = "y", xmin = NULL, xmax = NULL, ymin = NULL, ymax = NULL )
plot2D()
GauPro_base$plot2D()
loglikelihood()
GauPro_base$loglikelihood(mu = self$mu_hat, s2 = self$s2_hat)
optim()
GauPro_base$optim( restarts = 5, param_update = T, nug.update = self$nug.est, parallel = self$parallel, parallel_cores = self$parallel_cores )
optimRestart()
GauPro_base$optimRestart( start.par, start.par0, param_update, nug.update, optim.func, optim.grad, optim.fngr, lower, upper, jit = T )
update()
GauPro_base$update( Xnew = NULL, Znew = NULL, Xall = NULL, Zall = NULL, restarts = 5, param_update = self$param.est, nug.update = self$nug.est, no_update = FALSE )
update_data()
GauPro_base$update_data(Xnew = NULL, Znew = NULL, Xall = NULL, Zall = NULL)
update_corrparams()
GauPro_base$update_corrparams(...)
update_nugget()
GauPro_base$update_nugget(...)
deviance_searchnug()
GauPro_base$deviance_searchnug()
nugget_update()
GauPro_base$nugget_update()
grad_norm()
GauPro_base$grad_norm(XX)
sample()
GauPro_base$sample(XX, n = 1)
print()
GauPro_base$print()
clone()
The objects of this class are cloneable with this method.
GauPro_base$clone(deep = FALSE)
deep
Whether to make a deep clone.
# NOT RUN {
#n <- 12
#x <- matrix(seq(0,1,length.out = n), ncol=1)
#y <- sin(2*pi*x) + rnorm(n,0,1e-1)
#gp <- GauPro(X=x, Z=y, parallel=FALSE)
# }
Run the code above in your browser using DataLab