# NOT RUN {
#print_uncertainty_2d
set.seed(8)
N <- 9 #number of observations
T <- 80 #threshold
testfun <- branin
lower <- c(0,0)
upper <- c(1,1)
#a 9 points initial design
design <- data.frame( matrix(runif(2*N),ncol=2) )
response <- testfun(design)
#km object with matern3_2 covariance
#params estimated by ML from the observations
model <- km(formula=~., design = design,
response = response,covtype="matern3_2")
print_uncertainty_2d(model=model,T=T,main="probability of excursion",
type="pn",krigmeanplot=TRUE)
#print_uncertainty_2d(model=model,T=T,main="vorob uncertainty",
#type="vorob",krigmeanplot=FALSE)
#print_uncertainty_2d(model=model,T=T,main="imse uncertainty",
#type="imse",krigmeanplot=FALSE)
#print_uncertainty_2d(model=model,T=T,main="timse uncertainty",
#type="timse",krigmeanplot=FALSE)
#print_uncertainty_2d(model=model,T=T,main="sur
#uncertainty",type="sur",krigmeanplot=FALSE)
#print_uncertainty_2d(model=model,T=T,main="probability of excursion",
# type="pn",krigmeanplot=TRUE,vorobmean=TRUE)
# }
Run the code above in your browser using DataLab