View source: R/generateConfigdata.R
| generateConfigdata | R Documentation |
mlrMBO::mbo() optimization runsThis function benchmarks the mlrMBO::mbo() function on different configurations. The
resulting data can be used for several EBO functions such as EBO::boxplotCurve(), EBO::testAddIters(),
EBO::testConfigs().
generateConfigdata(
task,
funcEvals = 50,
paramsMBO = NULL,
namesBoxplot = c("default"),
repls = 20,
showInfo = TRUE,
ncpus = NA,
seed = 1
)
task |
[ |
funcEvals |
[ |
paramsMBO |
[ |
repls |
[ |
showInfo |
[ |
ncpus |
[ |
seed |
[ |
namesBoxplotCurve |
[ |
psOpt |
[ |
simulation |
[ |
minimize |
[ |
Benchmark data for each configuration.
[mlrMBO::mbo()]
Bernd Bischl, Jakob Richter, Jakob Bossek, Daniel Horn, Janek Thomas and Michel Lang; mlrMBO: A Modular Framework for Model-Based Optimization of Expensive Black-Box Functions, Preprint: https://arxiv.org/abs/1703.03373 (2017).
optimize::plotBenchmark() optimize::plotMboContourPlot()
## Not run:
set.seed(1)
library(mlrMBO)
library(ParamHelpers)
library(mlr)
# define infillCrit
ctrl = mlrMBO::makeMBOControl()
ctrl = mlrMBO::setMBOControlInfill(ctrl, crit = mlrMBO::makeMBOInfillCritEI())
# define MBO configuration
paramsMBO = data.table::data.table(
design = list("maximinLHS","randomLHS", "random"),
amountDesign = list(12),
control = list(ctrl),
surrogate = list(mlr::makeLearner("regr.km", predict.type = "se"))
)
namesBoxplot = c("maximinLHS",
"randomLHS",
"random")
# define runs of each algorithm
repls = 10
# define function evaluations
funcEvals = 32
data <- data.frame(a = runif(50,10,5555), b = runif(50,-30000,-500),
c = runif(50,0,1000))
data$ratio <- rowSums(data[,1:3]^2)
data$ratio <- data$ratio/max(data$ratio)
colnames(data) <- c("power", "time", "pressure","ratio")
psOpt = ParamHelpers::makeParamSet(
ParamHelpers::makeIntegerParam("power", lower = 10, upper = 5555),
ParamHelpers::makeIntegerParam("time", lower = -30000, upper = -500),
ParamHelpers::makeNumericParam("pressure", lower = 0, upper = 1000),
)
task = task(
simulation = "regr.randomForest",
data = data,
target = "ratio",
psOpt = psOpt,
minimize = FALSE
)
# generate configData
configResults = generateConfigdata(task, funcEvals = funcEvals, paramsMBO,
namesBoxplot = namesBoxplot, repls = repls)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.