smac.utils.configspace

Functions

convert_configurations_to_array(configs)

Impute inactive hyperparameters in configurations with their default.

get_conditional_hyperparameters(X[, Y])

Returns conditional hyperparameters if values with -1 or smaller are observed.

get_config_hash(config[, chars])

Returns a hash of the configuration.

get_types(configspace[, instance_features])

Return the types of the hyperparameters and the bounds of the hyperparameters and instance features.

print_config_changes(incumbent, challenger, ...)

Compares two configurations and prints the differences.

Interfaces

smac.utils.configspace.convert_configurations_to_array(configs)[source]

Impute inactive hyperparameters in configurations with their default.

Parameters:

configs (List[Configuration]) – List of configuration objects.

Return type:

np.ndarray

smac.utils.configspace.get_conditional_hyperparameters(X, Y=None)[source]

Returns conditional hyperparameters if values with -1 or smaller are observed. X is used if Y is not specified.

Return type:

ndarray

smac.utils.configspace.get_config_hash(config, chars=6)[source]

Returns a hash of the configuration.

Return type:

str

smac.utils.configspace.get_types(configspace, instance_features=None)[source]

Return the types of the hyperparameters and the bounds of the hyperparameters and instance features. :rtype: tuple[list[int], list[tuple[float, float]]]

Warning

The bounds for the instance features are not added in this function.

smac.utils.configspace.print_config_changes(incumbent, challenger, logger)[source]

Compares two configurations and prints the differences.

Return type:

None