print_uncertainty_2d {KrigInv} | R Documentation |
Prints a measure of uncertainty for 2d function.
Description
This function draws the value of a given measure of uncertainty over the whole input domain (2D).
The function can be used to print relevant outputs after having used the function EGI
or EGIparallel
.
Usage
print_uncertainty_2d(model, T, type = "pn",
lower = c(0, 0), upper = c(1, 1), resolution = 200,
new.points = 0,
xscale = c(0, 1), yscale = c(0, 1), show.points = TRUE,
cex.contourlab = 1, cex.points = 1,
cex.axis = 1, pch.points.init = 17, pch.points.end = 17,
col.points.init = "black", col.points.end = "red", nlevels = 10,
levels = NULL, xaxislab = NULL, yaxislab = NULL,
xaxispoint = NULL, yaxispoint = NULL,
krigmeanplot=FALSE,vorobmean=FALSE,consQuantile=NULL,...)
Arguments
model |
Kriging model of |
T |
Array containing one or several thresholds. |
type |
Type of uncertainty that the user wants to print.
Possible values are |
lower |
Vector containing the lower bounds of the input domain. |
upper |
Vector containing the upper bounds of the input domain. |
resolution |
Number of points to discretize the domain. This discretization is used in each dimension, so that the total number of points is |
new.points |
Number of new observations.
These observations are the last new.points observations and can be printed in another color and the initial observations (see argument: |
xscale |
If one wants to rescale the input domain on another interval it is possible to set this vector of size 2. The new interval will be translated by |
yscale |
see: |
show.points |
Boolean: should we show the observations on the graph ? |
cex.contourlab |
Multiplicative factor for the size of labels of the contour plot. |
cex.points |
Multiplicative factor for the size of the points. |
cex.axis |
Multiplicative factor for the size of the axis graduations. |
pch.points.init |
Symbol for the |
pch.points.end |
Symbol for the |
col.points.init |
Color for the |
col.points.end |
Color for the |
nlevels |
Integer corresponding to the number of levels of the contour plot. |
levels |
Array: one can directly set the levels of the contour plot. |
xaxislab |
Optional new labels that will replace the normal levels on x axis. |
yaxislab |
Optional new labels that will replace the normal levels on y axis. |
xaxispoint |
Position of these new labels on x axis. |
yaxispoint |
Position of these new labels on y axis. |
krigmeanplot |
Optional boolean. When it is set to |
vorobmean |
Optional boolean. When it is set to |
consQuantile |
Optional value for plotting conservative quantiles. In order to plot
|
... |
Additional arguments to the |
Value
The integrated uncertainty. If the conservative estimate is computed, it also returns the conservative quantile level.
Author(s)
Clement Chevalier (University of Neuchatel, Switzerland)
Dario Azzimonti (IDSIA, Switzerland)
References
Bect J., Ginsbourger D., Li L., Picheny V., Vazquez E. (2012), Sequential design of computer experiments for the estimation of a probability of failure, Statistics and Computing vol. 22(3), pp 773-793
See Also
print_uncertainty_1d
,print_uncertainty_nd
Examples
#print_uncertainty_2d
set.seed(9)
N <- 20 #number of observations
T <- c(20,40) #thresholds
testfun <- branin
lower <- c(0,0)
upper <- c(1,1)
#a 20 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")
## Not run:
print_uncertainty_2d(model=model,T=T,main="probability of excursion",
type="pn",krigmeanplot=TRUE,vorobmean=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 and conservative estimate at level 0.95
# uq2d<- print_uncertainty_2d(model=model,T=T,main="probability of excursion",
# type="pn",krigmeanplot=TRUE,vorobmean=FALSE,
# consQuantile=list(consLevel=0.95))
# print_uncertainty_2d(model=model,T=T,main="probability of excursion",
# type="pn",krigmeanplot=TRUE,vorobmean=FALSE,
# consQuantile=uq2d[2])
## End(Not run)