| gp_surrogate {gptools2} | R Documentation |
Gaussian Process surrogate function
Gaussian Process surrogate function
XA n-by-p numeric matrix where n is the number of data points, p is the number of dimensions; the predictor variables.
ysA n-by-1 column vector; the response variable.
sigmaA n-by-1 column vector or a scalar; the observational noise.
true_fA function; the function of which the surrogate is seeked.
modelA variable for storing the fitted model.
sample_funA function; the function to sample the next set of points to evaluate using the surrogate function. By default, it samples from the bounding hypercube of the variable 'X'.
select_funA function; the function to select the next point to evaluate using the true function. By default, it picks the point that has the highest predictive variance.
in_sample_fitThe in-sample fit of the fitted model to the training data X.
next_to_considerThe next set of points to evaluate using the surrogate function.
out_of_sample_uncertaintyThe out-of-sample uncertainty associated with 'next_to_consider'; the predictive variance.
next_to_evaluateThe next point to evaluate using the true function.
measureThe summary measure of the fitted model.
debugTRUE or FALSE, whether to use the debug mode.
new()Constructor of the Gaussian Process surrogate model
gp_surrogate$new( X, f, kernel = squared_exponential(), sigma = 0, sample_fun, select_fun, debug = FALSE, sample_n = 20, parallel = FALSE, mc.cores = 1, options = list(), ... )
XA numeric matrix; the training data.
fA function; the function of which the surrogate is seeked.
kernelThe kernel function of the Gaussian Process.
sigmaThe regularisation parameter of the Gaussian Process.
sample_funsample_fun A function; the function to sample the next set of points to evaluate using the surrogate function.
select_funselect_fun A function; the function to select the next point to evaluate using the true function.
debugTRUE or FALSE, whether to use the debug mode.
sample_nA positive integer; the number of samples to draw in each iteration. Note that this parameter is used only when 'sample_fun' is not provided.
parallelTRUE or FALSE; whether to use parallel computing.
mc.coresA positive integer; the number of cores to use for parallel computing. Only works when 'parallel = TRUE'.
optionsOptional argument to pass to optim.
...Additional parameters to pass to gp.
update()Update a fitted model with active learning
gp_surrogate$update(parallel = FALSE, mc.cores = 1, options)
parallelTRUE or FALSE; whether to use parallel computing.
mc.coresA positive integer; the number of cores to use for parallel computing. Only works when 'parallel = TRUE'.
optionsOptional argument to pass to optim
measure_fit_and_risk()Evaluate the fitted model using the in-sample fit and out-of-sample variance
gp_surrogate$measure_fit_and_risk()
clone()The objects of this class are cloneable with this method.
gp_surrogate$clone(deep = FALSE)
deepWhether to make a deep clone.