A collection of multiple ParamSet
objects.
The collection is basically a light-weight wrapper / container around references to multiple sets.
In order to ensure unique param names, every param in the collection is referred to with "<set_id>.<param_id>", where
<set_id>
is the name of the entry a givenParamSet
in the named list given during construction. Parameters fromParamSet
with empty (i.e.""
)set_id
are referenced directly. MultipleParamSet
s withset_id
""
can be combined, but their parameter names may not overlap to avoid name clashes.When you either ask for 'values' or set them, the operation is delegated to the individual, contained
ParamSet
references. The collection itself does not maintain avalues
state. This also implies that if you directly changevalues
in one of the referenced sets, this change is reflected in the collection.Dependencies: It is possible to currently handle dependencies
regarding parameters inside of the same set - in this case simply add the dependency to the set, best before adding the set to the collection
across sets, where a param from one set depends on the state of a param from another set - in this case add call
add_dep
on the collection.
If you call
deps
on the collection, you are returned a complete table of dependencies, from sets and across sets.
Super class
paradox::ParamSet
-> ParamSetCollection
Active bindings
deps
(
data.table::data.table()
)
Table has colsid
(character(1)
) andon
(character(1)
) andcond
(Condition). Lists all (direct) dependency parents of a param, through parameter IDs. Internally created by a call toadd_dep
. Settable, if you want to remove dependencies or perform other changes.extra_trafo
(
function(x, param_set)
)
Transformation function. Settable. User has to pass afunction(x)
, of the form
(namedlist()
, ParamSet) -> namedlist()
.
The function is responsible to transform a feasible configuration into another encoding, before potentially evaluating the configuration with the target algorithm. For the output, not many things have to hold. It needs to have unique names, and the target algorithm has to accept the configuration. For convenience, the self-paramset is also passed in, if you need some info from it (e.g. tags). Is NULL by default, and you can set it to NULL to switch the transformation off.constraint
(
function(x)
)
Constraint function. Settable. This function must evaluate a namedlist()
of values and determine whether it satisfies constraints, returning a scalarlogical(1)
value.sets
(named
list()
)
Read-onlylist
of ofParamSet
s contained in thisParamSetCollection
. This field provides direct references to theParamSet
objects.
Methods
Inherited methods
paradox::ParamSet$add_dep()
paradox::ParamSet$aggr_internal_tuned_values()
paradox::ParamSet$assert()
paradox::ParamSet$assert_dt()
paradox::ParamSet$check()
paradox::ParamSet$check_dependencies()
paradox::ParamSet$check_dt()
paradox::ParamSet$format()
paradox::ParamSet$get_domain()
paradox::ParamSet$get_values()
paradox::ParamSet$ids()
paradox::ParamSet$print()
paradox::ParamSet$qunif()
paradox::ParamSet$search_space()
paradox::ParamSet$set_values()
paradox::ParamSet$subset()
paradox::ParamSet$subspaces()
paradox::ParamSet$test()
paradox::ParamSet$test_constraint()
paradox::ParamSet$test_constraint_dt()
paradox::ParamSet$test_dt()
paradox::ParamSet$trafo()
Method new()
Creates a new instance of this R6 class.
Usage
ParamSetCollection$new(sets, tag_sets = FALSE, tag_params = FALSE)
Arguments
sets
(named
list()
of ParamSet)
ParamSet objects are not cloned. Names are used as "set_id" for the naming scheme of delegated parameters.tag_sets
(
logical(1)
)
Whether to add tags of the form"set_<set_id>"
to each parameter originating from a givenParamSet
given with name<set_id>
.tag_params
(
logical(1)
)
Whether to add tags of the form"param_<param_id>"
to each parameter with original ID<param_id>
.
Method add()
Adds a ParamSet
to this collection.
Arguments
p
(ParamSet).
n
(
character(1)
)
Name to use. Default""
.tag_sets
(
logical(1)
)
Whether to add tags of the form"set_<n>"
to the newly added parameters.tag_params
(
logical(1)
)
Whether to add tags of the form"param_<param_id>"
to each parameter with original ID<param_id>
.
Method disable_internal_tuning()
Set the parameter values so that internal tuning for the selected parameters is disabled.
Arguments
ids
(
character()
)
The ids of the parameters for which to disable internal tuning.
Method convert_internal_search_space()
Convert all parameters from the search space to parameter values using the transformation given by
in_tune_fn
.
Arguments
search_space
(
ParamSet
)
The internal search space.
Returns
(named list()
)