Configspace
smac.utils.configspace
#
convert_configurations_to_array
#
Impute inactive hyperparameters in configurations with their default.
| PARAMETER | DESCRIPTION |
|---|---|
configs
|
List of configuration objects.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
ndarray
|
|
Source code in smac/utils/configspace.py
create_uniform_configspace_copy
#
Creates a copy of the given configuration space with uniform transformed hyperparameters.
| PARAMETER | DESCRIPTION |
|---|---|
configspace
|
The configuration space to be transformed.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
ConfigurationSpace
|
A new configuration space with uniform transformed hyperparameters. |
Source code in smac/utils/configspace.py
get_conditional_hyperparameters
#
Returns conditional hyperparameters if values with -1 or smaller are observed. X is used if Y is not specified.
Source code in smac/utils/configspace.py
get_config_hash
#
get_types
#
get_types(
configspace: ConfigurationSpace,
instance_features: dict[str, list[float]] | None = None,
) -> tuple[list[int], list[tuple[float, float]]]
Return the types of the hyperparameters and the bounds of the hyperparameters and instance features.
Warning
The bounds for the instance features are not added in this function.
Source code in smac/utils/configspace.py
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 | |
print_config_changes
#
print_config_changes(
incumbent: Configuration | None,
challenger: Configuration | None,
logger: Logger,
) -> None
Compares two configurations and prints the differences.
Source code in smac/utils/configspace.py
transform_continuous_designs
#
transform_continuous_designs(
design: ndarray,
origin: str,
configspace: ConfigurationSpace,
) -> list[Configuration]
Transforms the continuous designs into a discrete list of configurations.
| PARAMETER | DESCRIPTION |
|---|---|
design
|
Array of hyperparameters originating from the initial design strategy.
TYPE:
|
origin
|
Label for a configuration where it originated from.
TYPE:
|
configspace
|
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
configs
|
Continuous transformed configs.
TYPE:
|