Multi Criteria Optimization Instance for Batch Optimization
Source:R/OptimInstanceBatchMultiCrit.R
OptimInstanceBatchMultiCrit.RdThe OptimInstanceBatchMultiCrit specifies an optimization problem for an OptimizerBatch.
The function oi() creates an OptimInstanceBatchMultiCrit.
Super classes
bbotk::OptimInstance -> bbotk::OptimInstanceBatch -> OptimInstanceBatchMultiCrit
Active bindings
result_x_domain(
list())
(transformed) x part of the result in the domain space of the objective.result_y(
numeric(1))
Optimal outcome.
Methods
Method new()
Creates a new instance of this R6 class.
Usage
OptimInstanceBatchMultiCrit$new(
objective,
search_space = NULL,
terminator,
check_values = TRUE,
callbacks = NULL,
archive = NULL
)Arguments
objective(Objective)
Objective function.search_space(paradox::ParamSet)
Specifies the search space for the Optimizer. The paradox::ParamSet describes either a subset of thedomainof the Objective or it describes a set of parameters together with atrafofunction that transforms values from the search space to values of the domain. Depending on the context, this value defaults to the domain of the objective.terminatorTerminator
Termination criterion.check_values(
logical(1))
Should points before the evaluation and the results be checked for validity?callbacks(list of mlr3misc::Callback)
List of callbacks.archive(Archive).
Method assign_result()
The Optimizer object writes the best found points and estimated performance values here (probably the Pareto set / front). For internal use.
Arguments
xdt(
data.table::data.table())
Set of untransformed points / points from the search space. One point per row, e.g.data.table(x1 = c(1, 3), x2 = c(2, 4)). Column names have to match ids of thesearch_space. However,xdtcan contain additional columns.ydt(
data.table::data.table())
Optimal outcome.extra(
data.table::data.table())
Additional information....(
any)
ignored.
Examples
# define the objective function
fun = function(xs) {
data.table(
y1 = xs$x1^2 + xs$x2^2,
y2 = (xs$x1 - 2)^2 + (xs$x2 - 1)^2
)
}
# set domain
domain = ps(
x1 = p_dbl(-5, 5),
x2 = p_dbl(-5, 5)
)
# set codomain
codomain = ps(
y1 = p_dbl(tags = "minimize"),
y2 = p_dbl(tags = "minimize")
)
# create objective
objective = ObjectiveRFun$new(
fun = fun,
domain = domain,
codomain = codomain,
properties = "deterministic"
)
# initialize instance
instance = oi(
objective = objective,
terminator = trm("evals", n_evals = 100))