Predict {GPM} | R Documentation |
The Prediction Function of GPM
Package
Description
Predicts the reponse(s), associated prediction uncertainties, and gradient(s) of the GP model fitted by Fit
.
Usage
Predict(XF, Model, MSE_on = 0, YgF_on = 0, grad_dim = rep(1, ncol(XF)))
Arguments
XF |
Matrix containing the locations (settings) where the predictions are desired. The rows and columns of |
Model |
The GP model fitted by |
MSE_on |
Flag (a scalar) indicating whether the uncertainty (i.e., mean squared error |
YgF_on |
Flag (a scalar) indicating whether the gradient(s) of the response(s) are desired. Set to a non-zero value to calculate the gradient(s). See |
grad_dim |
A binary vector of length |
Value
Output A list containing the following components:
YF
A matrix withn
rows (the number of prediction points) anddy
columns (the number of responses).MSE
A matrix withn
rows anddy
columns where each element represents the prediction uncertainty (i.e., the expected value of the squared difference between the prediction and the true response) associated with the corresponding element inYF
.YgF
An array of sizen
bysum{grad_dim}
bydx
.
Note
The gradient(s) can be calculated if
CorrType='G'
orCorrType='LBG'
. IfCorrType='PE'
orCorrType='LB'
, the gradient(s) can only be calculated ifPower = 2
andGamma = 1
, respectively.For efficiency, make sure the inputs are vecotrized and then passed to
Predict
. Avoid passing inputs individually in afor
loop.
References
Bostanabad, R., Kearney, T., Tao, S., Apley, D. W. & Chen, W. (2018) Leveraging the nugget parameter for efficient Gaussian process modeling. Int J Numer Meth Eng, 114, 501-516.
Plumlee, M. & Apley, D. W. (2017) Lifted Brownian kriging models. Technometrics, 59, 165-177.
See Also
Fit
to see how a GP model can be fitted to a training dataset.
Draw
to plot the response via the fitted model.
Examples
# See the examples in the fitting function.