| sobolGP | R Documentation |
Perform a kriging-based global sensitivity analysis taking into account both the meta-model and the Monte-Carlo errors. The Sobol indices are estimated with a Monte-Carlo integration and the true function is substituted by a kriging model. It is built thanks to the function km of the package DiceKriging.
The complete conditional predictive distribution of the kriging model is considered (not only the predictive mean).
sobolGP(
model,
type="SK",
MCmethod="sobol",
X1,
X2,
nsim=100,
nboot=1,
conf = 0.95,
sequential = FALSE,
candidate,
sequential.tot=FALSE,
max_iter = 1000)
## S3 method for class 'sobolGP'
ask(x, tot = FALSE, ...)
## S3 method for class 'sobolGP'
tell(x, y=NULL, xpoint=NULL, newcandidate=NULL, ...)
## S3 method for class 'sobolGP'
print(x, ...)
## S3 method for class 'sobolGP'
plot(x,...)
model |
an object of class |
type |
a character string giving the type of the considered kriging model. |
MCmethod |
a character string specifying the Monte-Carlo procedure used to estimate the Sobol indices. The avaible methods are : |
X1 |
a matrix representing the first random sample. |
X2 |
a matrix representing the second random sample. |
nsim |
an integer giving the number of samples for the conditional Gaussian process. It is used to quantify the uncertainty due to the kriging approximation. |
nboot |
an integer representing the number of bootstrap replicates. It is used to quantify the uncertainty due to the Monte-Carlo integrations. We recommend to set |
conf |
a numeric representing the confidence intervals taking into account the uncertainty due to the bootstrap procedure and the Gaussian process samples. |
sequential |
a boolean. If |
candidate |
a matrix representing the candidate points where the best new point to be simulated is selected. The lines represent the points and the columns represent the dimension. |
sequential.tot |
a boolean. If |
max_iter |
a numeric giving the maximal number of iterations for the propagative Gibbs sampler. It is used to simulate the realizations of the Gaussian process. |
x |
an object of class S3 |
tot |
a boolean. If |
xpoint |
a matrix representing a new point added to the kriging model. |
y |
a numeric giving the response of the function at |
newcandidate |
a matrix representing the new candidate points where the best point to be simulated is selected. If |
... |
any other arguments to be passed |
The function ask provides the new point where the function should be simulated. Furthermore, the function tell performs a new kriging-based sensitivity analysis when the point x with the corresponding observation y is added.
An object of class S3 sobolGP.
call : a list containing the arguments of the function sobolGP :
X1 : X1
X2 : X2
conf : conf
nboot : nboot
candidate : candidate
sequential : sequential
max_iter : max_iter
sequential.tot : sequential.tot
model : model
tot : tot
method : MCmethod
type : type
nsim : nsim
S : a list containing the results of the kriging-based sensitivity analysis for the MAIN effects:
mean : a matrix giving the mean of the Sobol index estimates.
var : a matrix giving the variance of the Sobol index estimates.
ci : a matrix giving the confidence intervals of the Sobol index estimates according to conf.
varPG : a matrix giving the variance of the Sobol index estimates due to the Gaussian process approximation.
varMC : a matrix giving the variance of the Sobol index estimates due to the Monte-Carlo integrations.
xnew : if sequential=TRUE, a matrix giving the point in candidate which is the best to simulate.
xnewi : if sequential=TRUE, an integer giving the index of the point in candidate which is the best to simulate.
T : a list containing the results of the kriging-based sensitivity analysis for the TOTAL effects:
mean : a matrix giving the mean of the Sobol index estimates.
var : a matrix giving the variance of the Sobol index estimates.
ci : a matrix giving the confidence intervals of the Sobol index estimates according to conf.
varPG : a matrix giving the variance of the Sobol index estimates due to the Gaussian process approximation.
varMC : a matrix giving the variance of the Sobol index estimates due to the Monte-Carlo integrations.
xnew : if sequential.tot=TRUE, a matrix giving the point in candidate which is the best to simulate.
xnewi : if sequential.tot=TRUE, an integer giving the index of the point in candidate which is the best to simulate.
Loic Le Gratiet, EDF R&D
L. Le Gratiet, C. Cannamela and B. Iooss (2014), A Bayesian approach for global sensitivity analysis of (multifidelity) computer codes, SIAM/ASA J. Uncertainty Quantification 2-1, pp. 336-363.
sobol, sobol2002, sobol2007, sobolEff, soboljansen, sobolMultOut, km
library(DiceKriging)
#--------------------------------------#
# kriging model building
#--------------------------------------#
d <- 2; n <- 16
design.fact <- expand.grid(x1=seq(0,1,length=4), x2=seq(0,1,length=4))
y <- apply(design.fact, 1, branin)
m <- km(design=design.fact, response=y)
#--------------------------------------#
# sobol samples & candidate points
#--------------------------------------#
n <- 1000
X1 <- data.frame(matrix(runif(d * n), nrow = n))
X2 <- data.frame(matrix(runif(d * n), nrow = n))
candidate <- data.frame(matrix(runif(d * 100), nrow = 100))
#--------------------------------------#
# Kriging-based Sobol
#--------------------------------------#
nsim <- 10 # put nsim <- 100
nboot <- 10 # put nboot <- 100
res <- sobolGP(
model = m,
type="UK",
MCmethod="sobol",
X1,
X2,
nsim = nsim,
conf = 0.95,
nboot = nboot,
sequential = TRUE,
candidate,
sequential.tot=FALSE,
max_iter = 1000
)
res
plot(res)
x <- ask(res)
y <- branin(x)
# The following line doesn't work (uncorrected bug:
# unused argument in km(), passed by update(), eval(), tell.sobolGP() ??)
#res.new <- tell(res,y,x)
#res.new
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.