GP_P: Provides output of calibrated gaussian process

View source: R/GP_P.R

GP_PR Documentation

Provides output of calibrated gaussian process

Description

Provides output of calibrated gaussian process

Usage

GP_P(EM_Cali, x, calc_var = FALSE, extra_output = FALSE)

Arguments

EM_Cali

List output of GP_C

x

Input 'design' for which the gaussian process will be estimated.

calc_var

Logical. Set to TRUE means that the full covariance matrix associated with x will be estimated. More time consiming. Defaults to FALSE

extra_output

Logical. TRUE if extra diagnostic output associated with the different contributions to output are needed.

Value

List of

yp

Output mean at points x

Sp_diag

Diagonal of co-variance matrix

yp_mean, yp_gauss

Mean and Gaussian_process contribution to output

Sp

If requested, full covariance matrix

ht, cxx, cxx_star, hht, htt, ttt

If requested (extra_output = TRUE), additional outputs associated to GP estimation. See Oakley and OHagan for expl.

Author(s)

Michel Crucifix

References

Jeremy Oakley and Anthony O\'Hagan, Bayesian Inference for the Uncertainty Distribution of Computer Model Outputs, Biometrika, 89, 769–784 2002

Ioannis Andrianakis and Peter G. Challenor, The effect of the nugget on Gaussian process emulators of computer models, Computational Statistics \& Data Analysis, 56, 4215–4228 2012

Examples

 X <- matrix(c(1,2,3,4,5,6,7), 7, 1)
 Y <- c(1.1, 2.1, 4.7, 1.3, 7.2, 8, 6)
 x <- seq(0,9,0.01)
 x <- matrix(x, length(x), 1)
  
 # comparse constant and linear regression
 
 models = c(constant='constant',linear='linear')
 colors = c(constant='blue', linear='red')

 E <- lapply(models, function(m)  GP_C(X, Y, lambda=list(theta=1, nugget=0.1), regress=m) )
 O <- lapply(models, function(m) GP_P(E[[m]], x) )

 plot(X, Y, xlim=c(0,10), ylim=c(0,9))
 
 for (m in models)
 {
 lines(x, O[[m]]$yp, col=colors[m])
 lines(x, O[[m]]$yp + sqrt(O[[m]]$Sp), lty=2, col=colors[m])
 lines(x, O[[m]]$yp - sqrt(O[[m]]$Sp), lty=2, col=colors[m])
 }


 legend('topleft', models, col=colors, lty=1)


mcrucifix/gp documentation built on July 29, 2023, 8:58 p.m.