Description Usage Arguments Details Value Author(s) References Examples
Main function to find quantiles.
1 2 3 |
model |
an object of class km |
fun |
the function of interest |
alpha |
the quantile level |
n.ite |
number of iterations (points to add) |
n |
the number of points used for integration |
n.large |
(optional) a larger number of points used prior to integration |
n.cluster |
number of cores used (requires the libraries |
seed |
the seed |
n.candidates |
(optional) a smaller number of candidate points on which the criterion is computed |
Xdistrib, x |
|
cov.reestim |
Boolean; if TRUE, the GP parameters are re-estimated at each iteration |
Either the distribution of the input Xdistrib
or a sample x must be given.
If x is given, the problem is treated as discrete.
In the standard setting, a large number of points (n.large
) is generated using Xdistrib
, out of which
n
useful integration points are selected. The SUR criterion is then evaluated at the most promising n.candidates
points. Finally, a local optimization is performed using BFGS
from the best candidate.
Maximum recommended values are 5,000 for n
, 1e6 for n.large
and 1,000 for n.candidates
.
A list with all.qn (all the quantiles estimated) and model (the last km model)
Victor Picheny
T. Labopin-Richard, V. Picheny, "Sequential design of experiments for estimating quantiles of black-box functions", Statistica Sinica, 2017, doi:10.5705/ss.202016.0160
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 | ## Not run:
library(DiceDesign)
#--------------------------------------------------------#
# Set problem parameters
fun <- branin
d <- 2
n.init <- 6
n.ite <- 24
seed <- 42
n <- 2e3
#--------------------------------------------------------#
# Define distribution over the input X
mu <- rep(.5, d)
Sigma <- matrix(rep(.05, d*d), d,d)
diag(Sigma) <- .1
Xdistrib <- function(n) return(mvrnorm(n=n, mu=mu, Sigma))
#--------------------------------------------------------#
# Initial set of observations (rescaled to fit Xdistrib)
x.init <- lhsDesign(n.init, d, seed=seed)$design
x.init <- mu + qnorm(x.init) %*% chol(Sigma)
y.init <- as.numeric(apply(x.init, 1, fun))
#--------------------------------------------------------#
# Initial kriging model
model <- km(~., design=data.frame(x=x.init), response=y.init,
lower=rep(.05,d), upper=rep(1,d), control=list(trace=FALSE))
#--------------------------------------------------------#
# Sequential design
res <- findQ(model=model, fun=fun, alpha=.95, n.ite=n.ite, n=n, n.cluster=1, seed=seed, n.large=1e5,
n.candidates=100, Xdistrib=Xdistrib, cov.reestim = TRUE)
#--------------------------------------------------------#
# Plot DoE and quantile estimates
plot(res$model@X[,1], res$model@X[,2])
plot(res$all.qn)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.