Description Usage Arguments Value Author(s) Examples
View source: R/coordinateProfiles.R
The function coordinateProfiles computes the profile extrema functions for the posterior mean of a Gaussian process and its confidence bounds
1 2 3 |
object |
either a km model or a list containing partial results. If |
threshold |
the threshold of interest |
options_full |
an optional list of options for getAllMaxMin, see getAllMaxMin for details. |
options_approx |
an optional list of options for approxMaxMin, see approxMaxMin for details. |
uq_computations |
boolean, if TRUE the uq computations for the profile mean are computed. |
plot_level |
an integer to select the plots to return (0=no plots, 1=basic plots, 2= all plots) |
plot_options |
an optional list of parameters for plots. See setPlotOptions for currently available options. |
CI_const |
an optional vector containing the constants for the CI. If not NULL, then profiles extrema for m_n(x) \pm CI_const[i]*s_n(x,x) are computed. |
return_level |
an integer to select the amount of details returned |
... |
additional parameters to be passed to coordProf_UQ. |
If return_level=1 a list containing
profMean_full:
the results of getAllMaxMin
for the posterior mean
profMean_approx:
the results of approxMaxMin
for the posterior mean
res_UQ:
the results of coordProf_UQ
for the posterior mean
if return_level=2 the same list as above but also including
abs_err:
the vector of maximum absolute approximation errors for the profile inf /sup on posterior mean for the chosen approximation
times:
a list containing
full:
computational time for the full computation of profile extrema
approx:
computational time for the approximate computation of profile extrema
Dario Azzimonti
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 | if (!requireNamespace("DiceKriging", quietly = TRUE)) {
stop("DiceKriging needed for this example to work. Please install it.",
call. = FALSE)
}
# Compute a kriging model from 50 evaluations of the Branin function
# Define the function
g=function(x){
return(-branin(x))
}
gp_des<-lhs::maximinLHS(20,2)
reals<-apply(gp_des,1,g)
kmModel<-km(design = gp_des,response = reals,covtype = "matern3_2")
threshold=-10
# Compute coordinate profiles on the posterior mean
# Increase multistart and size of designs for more precise results
options_full<-list(multistart=2,heavyReturn=TRUE, Design = replicate(2,seq(0,1,,50)))
init_des<-lhs::maximinLHS(12,2)
options_approx<- list(multistart=2,heavyReturn=TRUE,initDesign=init_des,fullDesignSize=50)
cProfilesMean<-coordinateProfiles(object=kmModel,threshold=threshold,options_full=options_full,
options_approx=options_approx,uq_computations=FALSE,
plot_level=3,plot_options=NULL,CI_const=NULL,return_level=2)
## Not run:
# Coordinate profiles with UQ with approximate profiles
plot_options<-list(save=FALSE, titleProf = "Coordinate profiles",
title2d = "Posterior mean",qq_fill=TRUE)
cProfilesUQ<-coordinateProfiles(object=cProfilesMean,threshold=threshold,options_full=options_full,
options_approx=options_approx,uq_computations=TRUE,
plot_level=3,plot_options=NULL,CI_const=NULL,return_level=2)
# Coordinate profiles with UQ with fully optim profiles
options_full_sims<-list(multistart=4,heavyReturn=TRUE, Design = replicate(2,seq(0,1,,60)))
cProfilesUQ<-coordinateProfiles(object=cProfilesMean,threshold=threshold,options_full=options_full,
options_approx=options_approx,uq_computations=TRUE,
plot_level=3,plot_options=NULL,CI_const=NULL,return_level=2,
options_full_sims=options_full_sims)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.