- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* tryout * smbo works * cleanup [ci skip] * plot, und multiobjective * fixes * typo * roxygen [ci skip] * add vignette and other stuff * updateMBO assertions * cleanup * vignette: add loop, smbo y arg check * use makeProposal in stepMBO * more argchecks * whoopsie * fixes checks
Showing
22 changed files
with
636 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
#' @title Initialize a manual sequential MBO run. | ||
#' @description When you want to run a human-in-the-loop MBO run you need to initialize it first. | ||
#' | ||
#' @inheritParams mbo | ||
#' @template arg_parset | ||
#' @param minimize [\code{logical}]\cr | ||
#' Should objective values of the target functions be minimized? One value par objective. | ||
#' Default is \code{TRUE} for every objective. | ||
#' @param noisy [\code{logical(1)}]\cr | ||
#' Is the target function noisy? | ||
#' Default is \code{FALSE}. | ||
#' | ||
#' @return [\code{\link{OptState}}] | ||
#' @export | ||
initSMBO = function(par.set, design, learner = NULL, control, minimize = rep(TRUE, control$n.objectives), noisy = FALSE, show.info = getOption("mlrMBO.show.info", TRUE)) { | ||
|
||
assertClass(par.set, "ParamSet") | ||
assertDataFrame(design) | ||
assertSetEqual(names(design), c(getParamIds(par.set, repeated = TRUE, with.nr = TRUE), control$y.name)) | ||
assertFlag(noisy) | ||
assertLogical(minimize, any.missing = FALSE) | ||
|
||
control$minimize = minimize | ||
control$noisy = noisy | ||
if (control$n.objectives == 1) { | ||
dummy.fun = makeSingleObjectiveFunction(name = "human in the loop", fn = function(...) return(NA), par.set = par.set, minimize = control$minimize, noisy = control$noisy) | ||
} else { | ||
dummy.fun = makeMultiObjectiveFunction(name = "human in the loop", fn = function(...) NA, par.set = par.set, n.objectives = control$n.objectives, minimize = control$minimize, noisy = control$noisy) | ||
} | ||
|
||
# assertions are done here: | ||
opt.problem = initOptProblem(fun = dummy.fun, design = design, learner = learner, control = control, show.info = show.info, more.args = list()) | ||
opt.state = makeOptState(opt.problem) | ||
evalMBODesign.OptState(opt.state) | ||
finalizeMboLoop(opt.state) | ||
return(opt.state) | ||
} | ||
|
||
#' @title Updates SMBO with the new observations | ||
#' @description After a function evaluation you want to update the \code{\link{OptState}} to get new proposals. | ||
#' | ||
#' @param opt.state [\code{\link{OptState}}] | ||
#' The optimization state. | ||
#' Generated by \code{\link{initSMBO}}, this function or an \code{\link{mbo}} run. | ||
#' @param x [\code{data.frame}] | ||
#' Named x values. | ||
#' One row per set of x values. | ||
#' @param y [\code{numeric|list}] | ||
#' Outcome of the optimization. | ||
#' For multiple results use a list. | ||
#' For a result of a multi-objective function use a numeric vector. | ||
#' | ||
#' @return [\code{\link{OptState}}] | ||
#' @export | ||
updateSMBO = function(opt.state, x, y) { | ||
opt.problem = getOptStateOptProblem(opt.state) | ||
opt.path = getOptStateOptPath(opt.state) | ||
control = getOptProblemControl(opt.problem) | ||
|
||
|
||
assertDataFrame(x) | ||
if (nrow(x) > 1 && !is.list(y)) { | ||
stopf("For a multipoint update y has to be a list.") | ||
} | ||
if (!is.list(y)) { | ||
y = list(y) | ||
} | ||
assertList(y, "numeric", len = nrow(x)) | ||
assertNumeric(y[[1]], len = control$n.objectives) | ||
|
||
|
||
infill.values = control$infill.crit$fun(points = x, models = getOptStateModels(opt.state)[[1]], control = control, design = convertOptPathToDf(opt.path, control), attributes = TRUE, iter = getOptStateLoop(opt.state)) | ||
|
||
prop = makeProposal( | ||
control = control, | ||
prop.points = x, | ||
prop.type = "manual", | ||
crit.vals = matrix(infill.values, ncol = 1L), | ||
crit.components = attr(infill.values, "crit.components")) | ||
|
||
extras = getExtras(n = nrow(prop$prop.points), prop = prop, train.time = 0, control = control) | ||
xs = dfRowsToList(prop$prop.points, getOptProblemParSet(getOptStateOptProblem(opt.state))) | ||
|
||
for (i in seq_along(xs)) { | ||
addOptPathEl(op = opt.path, x = xs[[i]], y = y[[i]], extra = extras[[i]]) | ||
} | ||
finalizeMboLoop(opt.state) | ||
invisible(opt.state) | ||
} | ||
|
||
#' @title Finalizes the SMBO Optimization | ||
#' @description Returns the common mlrMBO result object. | ||
#' | ||
#' @param opt.state [\code{\link{OptState}}] | ||
#' The optimization state. | ||
#' | ||
#' @return [\code{\link{MBOSingleObjResult}} | \code{\link{MBOMultiObjResult}}] | ||
#' @export | ||
finalizeSMBO = function(opt.state) { | ||
mboFinalize2(opt.state) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
initOptProblem = function(fun, design, learner, control, show.info, more.args) { | ||
assertClass(fun, "smoof_function") | ||
|
||
par.set = getParamSet(fun) | ||
|
||
assertDataFrame(design, null.ok = TRUE) | ||
if (!is.null(design)) { | ||
assertSubset(getParamIds(par.set, repeated = TRUE, with.nr = TRUE), names(design)) | ||
} | ||
|
||
|
||
learner = checkLearner(learner, control, fun) | ||
|
||
assertClass(control, "MBOControl") | ||
|
||
n.params = sum(getParamLengths(par.set)) | ||
control$noisy = isNoisy(fun) | ||
control$minimize = shouldBeMinimized(fun) | ||
if (is.null(design)) | ||
design = generateDesign(n.params * 4L, par.set, fun = lhs::maximinLHS) | ||
else | ||
assertDataFrame(design, min.rows = 1L, min.cols = 1L) | ||
control = checkStuff(fun, design, learner, control) | ||
control$infill.crit = initCrit(control$infill.crit, fun, design, learner, control) | ||
|
||
loadPackages(control) | ||
|
||
# generate an OptProblem which gathers all necessary information to define the optimization problem in one environment. | ||
makeOptProblem( | ||
fun = fun, | ||
design = design, | ||
learner = learner, | ||
control = control, | ||
show.info = assertFlag(show.info), | ||
more.args = assertList(more.args, null.ok = TRUE)) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
#' @title Generate ggplot2 Object | ||
#' | ||
#' @description Plots the values of the infill criterion for a 1- and 2-dimensional numerical search space for a given \code{\link{OptState}}. | ||
#' | ||
#' @param x [\code{OptState}]\cr | ||
#' The OptState. | ||
#' @param scale.panels [\code{logical(1)}]\cr | ||
#' If \code{TRUE} the values in each panel will be scaled to [0,1]. | ||
#' @param ... [any] \cr | ||
#' Not used. | ||
#' | ||
#' @export | ||
plot.OptState = function(x, scale.panels = FALSE, ...) { | ||
|
||
# all the variables we need | ||
opt.state = x | ||
opt.problem = getOptStateOptProblem(opt.state) | ||
control = getOptProblemControl(opt.problem) | ||
par.set = getOptProblemParSet(opt.problem) | ||
par.dim = getParamNr(par.set, devectorize = TRUE) | ||
if (par.dim > 2) { | ||
stop("Only plotting for 1- and 2-dimensional search spaces is possible.") | ||
} | ||
par.types = getParamTypes(par.set, use.names = TRUE, with.nr = TRUE, df.cols = TRUE, df.discretes.as.factor = TRUE) | ||
par.is.numeric = par.types %in% c("numeric", "integer") | ||
par.count.numeric = sum(par.is.numeric) | ||
par.count.discrete = par.dim - par.count.numeric | ||
opt.path = getOptStateOptPath(opt.state) | ||
design = convertOptPathToDf(opt.path, control) | ||
models = getOptStateModels(opt.state)$models | ||
x.ids = getParamIds(par.set, repeated = TRUE, with.nr = TRUE) | ||
y.ids = control$y.name | ||
infill = control$infill.crit | ||
|
||
# the data we need to plot | ||
points = generateGridDesign(par.set, 100, trafo = TRUE) | ||
infill.res = infill$fun(points = points, models = models, control = control, par.set = par.set, design = design, attributes = TRUE, iter = getOptStateLoop(opt.state)) | ||
|
||
crit.components = attr(infill.res, "crit.components") | ||
if (!is.null(crit.components)) { | ||
plot.data = data.table::data.table(infill = infill.res, crit.components, points) | ||
} else { | ||
plot.data = data.table::data.table(infill = infill.res, points) | ||
} | ||
|
||
if (infill$opt.direction == "maximize") { | ||
plot.data$infill = -1 * plot.data$infill | ||
} | ||
colnames(plot.data)[1] = control$infill.crit$id | ||
|
||
# add types to points | ||
design$type = ifelse(getOptPathDOB(opt.path) == 0, "init", "seq") | ||
|
||
# reduce to usefull infill components | ||
use.only.columns = c(x.ids, control$infill.crit$id, "mean", "se") | ||
use.only.columns = intersect(use.only.columns, colnames(plot.data)) | ||
plot.data = plot.data[, use.only.columns, with = FALSE] | ||
|
||
# prepare data for ggplot2 | ||
mdata = data.table::melt(plot.data, id.vars = x.ids) | ||
mdata$variable = factor(mdata$variable, levels = intersect(use.only.columns, levels(mdata$variable))) | ||
if (scale.panels) { | ||
predict.range = range(mdata[get("variable")=="mean", "value"]) | ||
mdata[, ':='("value", normalize(x = get("value"), method = "range")), by = "variable"] | ||
design[[y.ids]] = (design[[y.ids]] + (0 - predict.range[1])) / diff(predict.range) | ||
} | ||
if (par.count.numeric == 2) { | ||
g = ggplot2::ggplot(mdata, ggplot2::aes_string(x = x.ids[1], y = x.ids[2], fill = "value")) | ||
g = g + ggplot2::geom_tile() | ||
g = g + ggplot2::geom_point(data = design, mapping = ggplot2::aes_string(x = x.ids[1], y = x.ids[2], fill = y.ids[1], shape = "type")) | ||
g = g + ggplot2::facet_grid(~variable) | ||
brewer.div = colorRampPalette(RColorBrewer::brewer.pal(11, "Spectral"), interpolate = "spline") | ||
g = g + ggplot2::scale_fill_gradientn(colours = brewer.div(200)) | ||
} else if (par.count.numeric == 1) { | ||
g = ggplot2::ggplot(mdata, ggplot2::aes_string(x = x.ids[par.is.numeric], y = "value")) | ||
g = g + ggplot2::geom_line() | ||
g = g + ggplot2::geom_vline(data = design, mapping = ggplot2::aes_string(xintercept = x.ids[par.is.numeric]), alpha = 0.5, size = 0.25) | ||
g = g + ggplot2::geom_point(data = cbind(design, variable = "mean"), mapping = ggplot2::aes_string(x = x.ids[par.is.numeric], y = y.ids[1], shape = "type", color = "type")) | ||
g = g + ggplot2::scale_color_manual(values = c(init = "red", seq = "green")) | ||
if (par.count.discrete == 1) { | ||
formula.txt = paste0(names(par.types[!par.is.numeric]),"~variable") | ||
} else { | ||
formula.txt = "~variable" | ||
} | ||
g = g + ggplot2::facet_grid(as.formula(formula.txt)) | ||
} | ||
g = g + ggplot2::scale_shape_manual(values = c(init = 16, seq = 15)) | ||
g | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
context("manual smbo") | ||
|
||
test_that("human in the middle smbo works", { | ||
fun = testf.fsphere.2d | ||
des = testd.fsphere.2d | ||
des$y = apply(des, 1, fun) | ||
ps = testp.fsphere.2d | ||
ctrl = makeMBOControl() | ||
|
||
opt.state = initSMBO(par.set = ps, design = des, control = ctrl) | ||
prop = proposePoints(opt.state) | ||
assertList(prop) | ||
assertDataFrame(prop$prop.points) | ||
assertSetEqual(names(prop$prop.points), getParamIds(ps, TRUE, TRUE)) | ||
|
||
x = data.frame(x1 = 0, x2 = 0) | ||
y = fun(x = x) | ||
updateSMBO(opt.state, x = x, y = y) | ||
|
||
x = data.frame(x1 = -1, x2 = 1) | ||
y = fun(x = x) | ||
updateSMBO(opt.state, x = x, y = y) | ||
|
||
plot(opt.state) | ||
|
||
or = finalizeSMBO(opt.state) | ||
expect_number(or$y) | ||
expect_equal(getOptPathLength(or$opt.path), 12L) | ||
df = as.data.frame(or$opt.path) | ||
expect_numeric(df$x1) | ||
expect_numeric(df$x2) | ||
expect_set_equal(names(or$x), names(testp.fsphere.2d$pars)) | ||
}) | ||
|
||
test_that("human in the middle smbo works for multi objective", { | ||
par.set = getParamSet(testf.zdt1.2d) | ||
des = testd.zdt1.2d | ||
res = t(apply(des, 1, testf.zdt1.2d)) | ||
control = makeMBOControl(n.objectives = 2) | ||
control = setMBOControlInfill(control, crit = crit.dib1) | ||
colnames(res) = control$y.name | ||
des = cbind(des,res) | ||
opt.state = initSMBO(par.set, design = des, control = control, noisy = FALSE, minimize = shouldBeMinimized(testf.zdt1.2d)) | ||
plot(opt.state) | ||
proposePoints(opt.state) | ||
x = data.frame(x1 = 0.0002, x2 = 0.1) | ||
y = testf.zdt1.2d(x = x) | ||
updateSMBO(opt.state, x = x, y = y) | ||
or = finalizeSMBO(opt.state) | ||
}) | ||
|
||
test_that("human in the middle smbo works for mixed spaces", { | ||
par.set = testp.mixed | ||
fun = testf.mixed | ||
design = testd.mixed | ||
design$y = sapply(convertRowsToList(design, name.list = TRUE, name.vector = TRUE), fun) | ||
control = makeMBOControl() | ||
opt.state = initSMBO(par.set = par.set, design = design, control = control, minimize = shouldBeMinimized(fun), noisy = isNoisy(fun)) | ||
plot(opt.state) | ||
proposePoints(opt.state) | ||
x = data.frame(disc1 = "a", num1 = 0) | ||
y = fun(x) | ||
updateSMBO(opt.state, x = x, y = y) | ||
or = finalizeSMBO(opt.state) | ||
expect_equal(or$y, y) | ||
expect_equal(getOptPathLength(or$opt.path), 11L) | ||
df = as.data.frame(or$opt.path) | ||
expect_numeric(df$num1) | ||
expect_factor(df$disc1) | ||
expect_set_equal(names(or$x), names(par.set$pars)) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,170 @@ | ||
--- | ||
title: "Human-in-the-loop MBO" | ||
output: | ||
html_document: | ||
toc: true | ||
toc_float: | ||
collapsed: true | ||
smooth_scroll: false | ||
dev: svg | ||
vignette: > | ||
%\VignetteIndexEntry{Mixed Space Optimization} | ||
%\VignetteEngine{knitr::rmarkdown} | ||
%\VignetteEncoding{UTF-8} | ||
--- | ||
|
||
```{r setup, include = FALSE, cache = FALSE} | ||
library(mlrMBO) | ||
set.seed(123) | ||
knitr::opts_chunk$set(cache = TRUE, collapse = FALSE, dev = "svg", fig.height = 3.5) | ||
knitr::knit_hooks$set(document = function(x){ | ||
gsub("```\n*```r*\n*", "", x) | ||
}) | ||
hidden.objective = function(x) 1 + sin(x[1]*5) + 0.1 * sum(x^2) | ||
``` | ||
|
||
## Purpose | ||
|
||
This Vignette shows you how to use **mlrMBO** for a guided optimization. | ||
In this setting **mlrMBO** proposes a candidate configuration and you can then decide for yourself whether you want to evaluate it or another value. | ||
You have to evaluate the objective function manually. | ||
The value and the result have to be feed back to **mlrMBO**. | ||
Afterwards you can request the next candidate and so on. | ||
|
||
## Introduction | ||
|
||
Before we start the optimization you need to define the search space: | ||
|
||
```{r parset} | ||
ps = makeParamSet( | ||
makeNumericParam("q", lower = -1, upper = 2), | ||
makeIntegerParam("v", lower = -2, upper = 3) | ||
) | ||
``` | ||
|
||
Furthermore we need an initial design that includes the results of the evaluated function | ||
|
||
```{r init design} | ||
des = generateDesign(n = 7, par.set = ps) | ||
des | ||
``` | ||
|
||
After evaluating the objective function manually we can add the results | ||
|
||
```{r add results} | ||
des$y = c(1.20, 0.97, 0.91, 3.15, 0.58, 1.12, 0.50) | ||
``` | ||
|
||
Now we define our **mlrMBO**-Control object. | ||
For this example we stick to the defaults except that we set the infill-criterion to the **Expected Improvement** | ||
|
||
```{r mbocontrol} | ||
ctrl = makeMBOControl() | ||
ctrl = setMBOControlInfill(ctrl, crit = crit.ei) | ||
``` | ||
|
||
These information are enough to get us started and initialize the sequential MBO. | ||
|
||
```{r initSMBO} | ||
opt.state = initSMBO(par.set = ps, design = des, control = ctrl, minimize = TRUE, noisy = FALSE) | ||
``` | ||
|
||
At each state the `opt.state` object can be plotted to visualize the predictions of the surrogate model | ||
|
||
```{r plotOptState1} | ||
plot(opt.state) | ||
``` | ||
|
||
The first panel shows the value of the infill criterion. | ||
The higher the value the more this area is desirable to be explored to find the optimum. | ||
In the following panels the mean prediction of the surrogate and the uncertainty estimation is plotted. | ||
|
||
Let's see which point MBO suggests we should evaluate in the next step: | ||
|
||
```{r proposePoints1} | ||
proposePoints(opt.state) | ||
``` | ||
|
||
We don't have to stick to the suggestion and evaluate another point: | ||
```{r evaluate} | ||
x = data.frame(q = 1.7, v = 1) | ||
``` | ||
|
||
After we evaluated the objective function manually we get a return value of `2.19`. | ||
We take both values to update MBO: | ||
|
||
```{r update MBO} | ||
updateSMBO(opt.state, x = x, y = 2.19) | ||
``` | ||
|
||
Now we can plot the state again and ask for a proposal: | ||
|
||
```{r plotOptState2} | ||
plot(opt.state) | ||
(prop = proposePoints(opt.state)) | ||
``` | ||
|
||
This time we evaluated the exact proposed points and get a value of `0.13`. | ||
|
||
```{r update MBO 2} | ||
updateSMBO(opt.state, x = prop$prop.points, y = 0.13) | ||
``` | ||
|
||
Let's assume we want to stop here. | ||
To get to the usual MBO result you can call: | ||
|
||
```{r} | ||
res = finalizeSMBO(opt.state) | ||
res$x | ||
res$y | ||
``` | ||
|
||
### Semi Automatic MBO | ||
|
||
You can combine the human-in-the-loop MBO with a simple loop to let MBO run for a while and just interfere once in a while. | ||
|
||
```{r} | ||
f = function(q, v) 1 + sin(q*5) + 0.1 * (q^2 + v^2) | ||
for (i in 1:10) { | ||
prop = proposePoints(opt.state) | ||
x = dfRowsToList(df = prop$prop.points, par.set = ps) | ||
y = do.call(f, x[[1]]) | ||
updateSMBO(opt.state, x = prop$prop.points, y = y) | ||
} | ||
proposePoints(opt.state) | ||
``` | ||
|
||
## Continue a normal MBO Run | ||
|
||
You can also continue a normal call of `mbo()` using this manual interface: | ||
|
||
```{r continue mbo} | ||
fun = makeAlpine02Function(1) | ||
res = mbo(fun = fun, control = ctrl) | ||
opt.state = res$final.opt.state | ||
plot(opt.state, scale.panels = TRUE) | ||
(prop = proposePoints(opt.state)) | ||
y = fun(prop$prop.points) | ||
updateSMBO(opt.state, x = prop$prop.points, y = y) | ||
# ... | ||
``` | ||
|
||
## Proposal of multiple points | ||
|
||
Using multipoint-MBO you can also obtain multiple suggestions at each call of `proposePoints()`. | ||
|
||
```{r multipoint} | ||
ctrl = makeMBOControl(propose.points = 4) | ||
ctrl = setMBOControlInfill(ctrl, crit = makeMBOInfillCritEI()) | ||
ctrl = setMBOControlMultiPoint(ctrl, method = "cl") | ||
opt.state = initSMBO(par.set = ps, design = des, control = ctrl, minimize = TRUE, noisy = FALSE) | ||
(prop = proposePoints(opt.state)) | ||
``` | ||
|
||
It's also okay to just evaluate a subset of these points. | ||
|
||
```{r update multipoint} | ||
updateSMBO(opt.state, x = prop$prop.points[1:2,], y = list(2.28, 1.67)) | ||
# ... | ||
``` |