deepcave.utils.configspace¶
# ConfigSpace
This module samples random as well as border configurations.
Functions
|
Generate border configurations from the configuration space. |
|
Generate random configurations from the configuration space. |
- deepcave.utils.configspace.sample_border_config(configspace)[source]¶
Generate border configurations from the configuration space.
- Parameters:
configspace (ConfigurationSpace) – The configuration space from which the hyperparameters are drawn from.
- Yields:
Iterator[Configuration] – Border configurations.
- Return type:
Iterator
[Configuration
]
- deepcave.utils.configspace.sample_random_config(configspace, d=None)[source]¶
Generate random configurations from the configuration space.
- Parameters:
configspace (ConfigurationSpace) – The configspace from which the hyperparameters are drawn from.
d (Optional[int], optional) – The possible hyperparameter values can be reduced by this argument as the range gets discretized. For example, an integer or float hyperparameter has only four possible values if d=4. By default, None (no discretization is done).
- Yields:
Iterator[Configuration] – Random configurations.
- Return type:
Iterator
[Configuration
]