Corr Gauss GP using inherited optim
Corr Gauss GP using inherited optim
Object of R6Class
with methods for fitting GP model.
R6Class
object.
GauPro::GauPro
-> GauPro_kernel_model_LOO
tmod
A second GP model for the t-values of leave-one-out predictions
use_LOO
Should the leave-one-out error corrections be used?
new()
Create a kernel model that uses a leave-one-out GP model to fix the standard error predictions.
GauPro_kernel_model_LOO$new(..., LOO_kernel, LOO_options = list())
...
Passed to super$initialize.
LOO_kernel
The kernel that should be used for the leave-one-out model. Shouldn't be too smooth.
LOO_options
Options passed to the leave-one-out model.
update()
Update the model. Should only give in (Xnew and Znew) or (Xall and Zall).
GauPro_kernel_model_LOO$update( Xnew = NULL, Znew = NULL, Xall = NULL, Zall = NULL, restarts = 5, param_update = self$param.est, nug.update = self$nug.est, no_update = FALSE )
Xnew
New X values to add.
Znew
New Z values to add.
Xall
All X values to be used. Will replace existing X.
Zall
All Z values to be used. Will replace existing Z.
restarts
Number of optimization restarts.
param_update
Are the parameters being updated?
nug.update
Is the nugget being updated?
no_update
Are no parameters being updated?
pred_one_matrix()
Predict for a matrix of points
GauPro_kernel_model_LOO$pred_one_matrix( XX, se.fit = F, covmat = F, return_df = FALSE )
XX
points to predict at
se.fit
Should standard error be returned?
covmat
Should covariance matrix be returned?
return_df
When returning se.fit, should it be returned in a data frame?
clone()
The objects of this class are cloneable with this method.
GauPro_kernel_model_LOO$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_kernel_model_LOO$new(X=x, Z=y, kernel=Gaussian)
y <- x^2 * sin(2*pi*x) + rnorm(n,0,1e-3)
gp <- GauPro_kernel_model_LOO$new(X=x, Z=y, kernel=Matern52)
y <- exp(-1.4*x)*cos(7*pi*x/2)
gp <- GauPro_kernel_model_LOO$new(X=x, Z=y, kernel=Matern52)
# }
Run the code above in your browser using DataLab