| oi | R Documentation |
Function to construct a OptimInstanceBatchSingleCrit and OptimInstanceBatchMultiCrit.
oi(
objective,
search_space = NULL,
terminator,
callbacks = NULL,
check_values = TRUE,
keep_evals = "all"
)
objective |
(Objective) |
search_space |
(paradox::ParamSet) |
terminator |
Terminator |
callbacks |
(list of mlr3misc::Callback) |
check_values |
( |
keep_evals |
( |
# define the objective function
fun = function(xs) {
list(y = - (xs[[1]] - 2)^2 - (xs[[2]] + 3)^2 + 10)
}
# set domain
domain = ps(
x1 = p_dbl(-10, 10),
x2 = p_dbl(-5, 5)
)
# set codomain
codomain = ps(
y = p_dbl(tags = "maximize")
)
# create objective
objective = ObjectiveRFun$new(
fun = fun,
domain = domain,
codomain = codomain,
properties = "deterministic"
)
# initialize instance
instance = oi(
objective = objective,
terminator = trm("evals", n_evals = 20)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.