Learn R Programming

SPOT (version 2.11.10)

predict.dace: DACE predictor

Description

Predicts y(x) for a given DACE model (i.e. as created by buildKrigingDACE).

Usage

# S3 method for dace
predict(object, newdata, ...)

Arguments

object

Kriging model (settings and parameters) of class dace.

newdata

design matrix (x) to be predicted

...

not used

Value

returns a list with the following elements:

f

Predicted response y at design points x (always)

df

Gradient of response y at design points x (only if: GRAD==TRUE and mx==1)

s

Estimated MSE (only if: MSE==TRUE)

ds

Gradient of MSE (only if: GRADMSE==TRUE and mx==1)

The user can choose whether to predict only mean or if he is also interested in gradient, mean squared error MSE, or the MSE gradient. object$GRAD specifies whether gradient of response should be computed. Even if GRAD is TRUE, the gradient will only be computed in case of a single design point. MSE specifies whether estimated MSE of response should be computed. GRADMSE specifies whether gradient of MSE should be computed. Even if GRADMSE is TRUE, the gradient will only be computed in case of a single design point.

References

S.~Lophaven, H.~Nielsen, and J.~Sondergaard. DACE---A Matlab Kriging Toolbox. Technical Report IMM-REP-2002-12, Informatics and Mathematical Modelling, Technical University of Denmark, Copenhagen, Denmark, 2002.

See Also

buildKrigingDACE

Examples

Run this code
# NOT RUN {
## Create design points
x <- cbind(runif(20)*15-5,runif(20)*15)
## Compute observations at design points
y <- funSphere(x)
## Create model
fit <- buildKrigingDACE(x,y)
## Create new design
xx <- cbind(runif(20)*15-5,runif(20)*15)
## Predict candidates
y1 <- predict(fit,xx)$y
## Plot residuals
plot(y1 - funSphere(xx))

# }

Run the code above in your browser using DataLab