smac.configspace.util module

smac.configspace.util.convert_configurations_to_array(configs: typing.List[ConfigSpace.configuration_space.Configuration]) → numpy.ndarray[source]

Impute inactive hyperparameters in configurations with their default.

Necessary to apply an EPM to the data.

Parameters:configs (List[Configuration]) – List of configuration objects.
Returns:Array with configuration hyperparameters. Inactive values are imputed with their default value.
Return type:np.ndarray
smac.configspace.util.impute_default_values(configuration_space: ConfigSpace.configuration_space.ConfigurationSpace, configs_array: numpy.ndarray) → numpy.ndarray[source]

Impute inactive hyperparameters in configuration array with their default.

Necessary to apply an EPM to the data.

Parameters:
  • configuration_space (ConfigurationSpace) –
  • configs_array (np.ndarray) – Array of configurations.
Returns:

Array with configuration hyperparameters. Inactive values are imputed with their default value.

Return type:

np.ndarray