print_uncertainty_1d: Prints a measure of uncertainty for 1d function.

View source: R/print_uncertainty_1d.R

print_uncertainty_1dR Documentation

Prints a measure of uncertainty for 1d function.

Description

This function draws the value of a given measure of uncertainty over the whole input domain (1D). The function can be used to print relevant outputs after having used the function EGI or EGIparallel.

Usage

print_uncertainty_1d(model, T, type = "pn",
lower = 0, upper = 1, resolution = 500, new.points = 0,
xscale = c(0, 1), show.points = TRUE, cex.points = 1,
cex.axis = 1, pch.points.init = 17, pch.points.end = 17,
col.points.init = "black", col.points.end = "red", xaxislab = NULL,
yaxislab = NULL, xaxispoint = NULL, yaxispoint = NULL,
vorobmean=FALSE,krigmeanplot=FALSE,Tplot=FALSE,consQuantile=NULL,...)

Arguments

model

Kriging model of km class.

T

Array containing one or several thresholds.

type

Type of uncertainty that the user wants to print. Possible values are "pn" (probability of excursion), or "sur", "imse", "timse", "vorob" if we print a measure of uncertainty corresponding to one criterion.

lower

Lower bound for the input domain.

upper

Upper bound for the input domain.

resolution

Number of points to discretize the interval (lower,upper).

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: col.points.end).

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 xscale[1] and expanded by a factor xscale[2] - xscale[1].

show.points

Boolean: should we show the observations on the graph ?

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 n-new.points first observations.

pch.points.end

Symbol for the new.points last observations.

col.points.init

Color for the n-new.points first observations.

col.points.end

Color for the new.points last observations.

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.

vorobmean

Optional boolean. When it is set to TRUE the Vorob'ev expectation is plotted. It corresponds to the averaged excursion set, using the definition of Vorob'ev. Here, the estimated set is the set above the Vorob'ev threshold (plotted in blue).

krigmeanplot

When set to TRUE a kriging mean is plotted on a second y axis.

Tplot

When set to TRUE, and if krigmeanplot is also set to TRUE, draws horizontal lines corresponding to the different thresholds T.

consQuantile

Optional value for plotting conservative quantiles. In order to plot

  • Conservative estimates: consQuantile is a list containing at least consLevel (scalar), with the option typeEx (character, default = ">").

  • Generic Vorob'ev quantiles: consQuantile is a scalar corresponding to the Vorob'ev quantile level.

...

Additional arguments to the plot function.

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_2d,print_uncertainty_nd

Examples

#print_uncertainty_1d

set.seed(9)
N <- 9 #number of observations
T <- c(-0.2,0.2) #thresholds
testfun <- sin
lower <- c(0)
upper <- c(6)

#a 20 points initial design
design <- data.frame( lower+(upper-lower)*matrix(runif(N),ncol=1) )
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_1d(model=model,T=T,lower=lower,upper=upper,
  main="probability of excursion",xlab="x",ylab="pn",
  cex.points=1.5,col.points.init="red",
  krigmeanplot=TRUE,Tplot=TRUE)

## Not run: 
uq1d <- print_uncertainty_1d(model=model,T=T,lower=lower,upper=upper,
  main="probability of excursion",xlab="x",ylab="pn",
  cex.points=1.5,col.points.init="red",
  krigmeanplot=TRUE,Tplot=TRUE,consQuantile =list(consLevel=0.95))

  print_uncertainty_1d(model=model,T=T,lower=lower,upper=upper,
  main="probability of excursion",xlab="x",ylab="pn",
  cex.points=1.5,col.points.init="red",
  krigmeanplot=TRUE,Tplot=TRUE,consQuantile =uq1d[2])

## End(Not run)


KrigInv documentation built on Sept. 9, 2022, 5:08 p.m.