# predict.CGP: Predict from the composite Gaussian process model In CGP: Composite Gaussian Process Models

## Description

Compute predictions from the composite Gaussian process (CGP) model. 95% prediction intervals can also be calculated.

## Usage

 1 2 ## S3 method for class 'CGP' predict(object, newdata = NULL, PI = FALSE, ...) 

## Arguments

 object An object of class "CGP" newdata Optional. The matrix of predictive input locations, where each row of newdata corresponds to one predictive location PI If TRUE, 95% prediction intervals are also calculated. Default is FALSE ... For compatibility with generic method predict

## Details

Given an object of “CGP” class, this function predicts responses at unobserved newdata locations. If the PI is set to be TRUE, 95% predictions intervals are also computed.

If newdata is equal to the design matrix of the object, predictions from the CGP model will be identical to the yobs component of the object and the width of the prediction intervals will be shrunk to zero. This is due to the interpolating property of the predictor.

## Value

The function returns a list containing the following components:

 Yp Vector of predictive values at newdata locations (Yp=gp+lp) gp Vector of predictive values at newdata locations from the global process lp Vector of predictive values at newdata locations from the local process v Vector of predictive standardized local volatilities at newdata locations Y_low If PI=TRUE, vector of 5% predictive quantiles at newdata locations Y_up If PI=TRUE, vector of 95% predictive quantiles at newdata locations

## Author(s)

Shan Ba <[email protected]> and V. Roshan Joseph <[email protected]>

## References

Ba, S. and V. Roshan Joseph (2012) “Composite Gaussian Process Models for Emulating Expensive Functions”. Annals of Applied Statistics, 6, 1838-1860.

CGP, print.CGP, summary.CGP
  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 ### A simulated example from Gramacy and Lee (2012) Cases for the nugget ### in modeling computer experiments''. \emph{Statistics and Computing}, 22, 713-722. #Training data X<-c(0.775,0.83,0.85,1.05,1.272,1.335,1.365,1.45,1.639,1.675, 1.88,1.975,2.06,2.09,2.18,2.27,2.3,2.36,2.38,2.39) yobs<-sin(10*pi*X)/(2*X)+(X-1)^4 #Testing data UU<-seq(from=0.7,to=2.4,by=0.001) y_true<-sin(10*pi*UU)/(2*UU)+(UU-1)^4 plot(UU,y_true,type="l",xlab="x",ylab="y") points(X,yobs,col="red") ## Not run: #Fit the CGP model mod<-CGP(X,yobs) summary(mod) mod$objval #-40.17315 mod$lambda #0.01877432 mod$theta #2.43932 mod$alpha #578.0898 mod$bandwidth #1 mod$rmscv #0.3035192 #Predict for the testing data 'UU' modpred<-predict(mod,UU) #Plot the fitted CGP model #Red: final predictor; Blue: global trend lines(UU,modpred$Yp,col="red",lty=3,lwd=2) lines(UU,modpred$gp,col="blue",lty=5,lwd=1.8) ## End(Not run)