ParamSetCollection {paradox}R Documentation

ParamSetCollection

Description

A collection of multiple ParamSet objects.

Super class

paradox::ParamSet -> ParamSetCollection

Active bindings

deps

(data.table::data.table())
Table has cols id (character(1)) and on (character(1)) and cond (Condition). Lists all (direct) dependency parents of a param, through parameter IDs. Internally created by a call to add_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 a ⁠function(x)⁠, of the form
(named list(), ParamSet) -> named list().
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 named list() of values and determine whether it satisfies constraints, returning a scalar logical(1) value.

sets

(named list())
Read-only list of of ParamSets contained in this ParamSetCollection. This field provides direct references to the ParamSet objects.

Methods

Public methods

Inherited methods

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 given ParamSet 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.

Usage
ParamSetCollection$add(p, n = "", tag_sets = FALSE, tag_params = FALSE)
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.

Usage
ParamSetCollection$disable_internal_tuning(ids)
Arguments
ids

(character())
The ids of the parameters for which to disable internal tuning.

Returns

Self


Method convert_internal_search_space()

Convert all parameters from the search space to parameter values using the transformation given by in_tune_fn.

Usage
ParamSetCollection$convert_internal_search_space(search_space)
Arguments
search_space

(ParamSet)
The internal search space.

Returns

(named list())


Method flatten()

Create a ParamSet from this ParamSetCollection.

Usage
ParamSetCollection$flatten()

Method clone()

The objects of this class are cloneable with this method.

Usage
ParamSetCollection$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


[Package paradox version 1.0.1 Index]