Configspace
smac.utils.configspace
#
convert_configurations_to_array
#
Impute inactive hyperparameters in configurations with their default.
Parameters#
configs : List[Configuration] List of configuration objects.
Returns#
np.ndarray
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
50 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 |
|
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.
Parameters#
design : np.ndarray Array of hyperparameters originating from the initial design strategy. origin : str | None, defaults to None Label for a configuration where it originated from. configspace : ConfigurationSpace
Returns#
configs : list[Configuration] Continuous transformed configs.