Predict {GaSP} | R Documentation |
Predict from a GaSPModel
object.
Description
Predict from a GaSPModel
object.
Usage
Predict(GaSP_model, x_pred, generate_coefficients = c(FALSE, TRUE))
Arguments
GaSP_model |
Object of class |
x_pred |
A data frame containing the values of the input variables at which to predict the output. |
generate_coefficients |
A boolean indicating whether coefficients for further external predictions are generated. |
Value
A list with the following elements:
y_pred |
A data frame with two columns: the predictions
|
pred_coeffs |
A vector of coefficients for further predictions;
|
Note
The vector of prediction coefficients in pred_coeffs
can be used as follows. Let c
denote the coefficients and let
r
denote a vector with element i
containing the correlation
between the output at a given new point and the output at training point i
.
Then the prediction for the output at the new point is the dot product
of c
and r
.
RMSE
computes the root mean squared error
of the predictions.
PlotPredictions
and PlotResiduals
plot the predictions or their residuals;
PlotStdResiduals
and PlotQQ
plot the standardized residuals.
Examples
borehole_pred <- Predict(
GaSP_model = borehole_fit,
x_pred = borehole$x_pred,
generate_coefficients = TRUE
)