Description Usage Arguments Value Author(s) Examples
View source: R/max_surnew_robinv.R
Minimizes the surnew criterion using either discrete or genetic optimization
| 1 2 | max_surnew_robinv(lower, upper, optimcontrol = NULL, opt.index,
  inv.index, integration.param, T, model, new.noise.var = NULL)
 | 
| lower | Array of size d. Lower bound of the input domain. | 
| upper | Array of size d. Upper bound of the input domain. | 
| optimcontrol | A list with the following fields. method : can be either
equal to  (I) If  (II) If  | 
| opt.index | Array with integers corresponding to the indices of the nuisance parameters. | 
| inv.index | Array with integers corresponding to the indices of the controlled parameters. | 
| integration.param | An object obtained from a call to the
 | 
| T | Target threshold. | 
| model | The current kriging model. km object. | 
| new.noise.var | Noise variance of the new observations. Leave to NULL for noiseless functions. For noisy functions, any non zero value is valid and will give the same result. | 
A list with the following fields. (i) par: optimizer of the sampling criterion. (ii) value: minimum of the sampling criterion. (iii) allvalues: when a discrete optimization is performed, this contains all the values of the criterion for the tested points.
Clement Chevalier clement.chevalier@unine.ch
| 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 40 41 42 43 44 45 | library(KrigInv)
myfun <- branin_robinv
d <- 3
set.seed(8)
n0 <- 30
T <- 10
opt.index <- c(3)
inv.index <- c(1,2)
lower <- rep(0,times=d)
upper <- rep(1,times=d)
design <- matrix(runif(d*n0),nrow=n0)
response <- myfun(design)
model <- km(formula = ~1,design = design,response = response,covtype = "matern3_2")
integcontrol <- list(distrib = "surnew",n.points = 20,finaldistrib="surnew",
                     n.candidates=50,nsimu=1000,n.optpoints = 50,
                     choose_optpoints=TRUE,n.optpoints.candidates=500)
## Not run: 
obj <- integration_design_robinv(integcontrol = integcontrol,d=d,lower=lower,upper=upper,
                                 opt.index=opt.index,inv.index=inv.index,model=model,T=T)
# one try with discrete optimization:
optimcontrol <- list(method="discrete")
result <- max_surnew_robinv(lower = lower,upper = upper,optimcontrol = optimcontrol,
                            opt.index = opt.index,inv.index = inv.index,
                            integration.param = obj,T = T,model = model)
result$par
result$value
# one try with genoud optimization:
optimcontrol <- list(method="pso",pop.size = 200,max.generations=3)
result2 <- max_surnew_robinv(lower = lower,upper = upper,optimcontrol = optimcontrol,
                             opt.index = opt.index,inv.index = inv.index,
                             integration.param = obj,T = T,model = model)
result2$par
result2$value
## End(Not run)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.