Container around a data.table::data.table which stores all performed function calls of the Objective.
as.data.table(archive)
Archive -> data.table::data.table()
Returns a tabular view of all performed function calls of the
Objective. The x_domain
column is unnested to separate columns.
search_space
(paradox::ParamSet) Search space of objective.
codomain
(paradox::ParamSet) Codomain of objective function.
start_time
(POSIXct) Time stamp of when the optimization started. The time is set by the Optimizer.
check_values
(logical(1)
)
Determines if points and results are checked for validity.
data
(data.table::data.table) Contains all performed Objective function calls.
store_x_domain
(logical(1)
)
Determines if x values, should be stored in $data$x_domain
as list
items. The trafo will be applied if defined in search_space
.
n_evals
(integer(1)
)
Number of evaluations stored in the archive.
n_batch
(integer(1)
)
Number of batches stored in the archive.
cols_x
(character()
)
Column names of search space parameters.
cols_y
(character()
)
Column names of codomain parameters.
new()
Creates a new instance of this R6 class.
Archive$new(search_space, codomain, check_values = TRUE, store_x_domain = TRUE)
search_space
(paradox::ParamSet)
Specifies the search space for the Optimizer. The paradox::ParamSet
describes either a subset of the domain
of the Objective or it describes
a set of parameters together with a trafo
function 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.
codomain
(paradox::ParamSet) Specifies codomain of function. Most importantly the tags of each output "Parameter" define whether it should be minimized or maximized. The default is to minimize each component.
check_values
(logical(1)
)
Should x-values that are added to the archive be checked for validity?
Search space that is logged into archive.
store_x_domain
(logical(1)
)
Determines if x values, should be stored in $data$x_domain
as list
items. The trafo will be applied if defined in search_space
.
add_evals()
Adds function evaluations to the archive table.
Archive$add_evals(xdt, xss_trafoed = NULL, ydt)
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 the search_space
.
However, xdt
can contain additional columns.
xss_trafoed
(list()
)
Transformed point(s) in the domain space.
Not stored and needed if store_x_domain = FALSE
.
ydt
(data.table::data.table()
)
Optimal outcome.
best()
Returns the best scoring evaluation. For single-crit optimization, the solution that minimizes / maximizes the objective function. For multi-crit optimization, the Pareto set / front.
Archive$best(batch = NULL)
batch
(integer()
)
The batch number(s) to limit the best results to. Default is
all batches.
format()
Helper for print outputs.
Archive$format()
print()
Printer.
Archive$print()
...
(ignored).
clear()
Clear all evaluation results from archive.
Archive$clear()
clone()
The objects of this class are cloneable with this method.
Archive$clone(deep = FALSE)
deep
Whether to make a deep clone.