deephyper.problem.Configuration#

class deephyper.problem.Configuration(configuration_space: ConfigurationSpace, values: None | Dict[str, str | float | int] = None, vector: None | ndarray = None, allow_inactive_with_values: bool = False, origin: Any = None, config_id: int | None = None)#

Bases: Mapping

Methods

get

Return for a given hyperparameter name item the value of this hyperparameter.

get_array

Return the internal vector representation of the Configuration.

get_dictionary

Return a representation of the Configuration in dictionary form.

is_valid_configuration

Check if the object is a valid Configuration.

items

keys

Cache the keys to speed up the process of retrieving the keys.

values

get(item: unicode, default: None | Any = None) None | Any#

Return for a given hyperparameter name item the value of this hyperparameter. default if the hyperparameter name doesn’t exist.

Parameters:
  • item (str) – Name of the desired hyperparameter

  • default (None, Any) –

Returns:

Value of the hyperparameter

Return type:

Any, None

get_array() ndarray#

Return the internal vector representation of the Configuration. All continuous values are scaled between zero and one.

Returns:

The vector representation of the configuration

Return type:

numpy.ndarray

get_dictionary() Dict[str, str | float | int]#

Return a representation of the Configuration in dictionary form.

Returns:

Configuration as dictionary

Return type:

dict

is_valid_configuration() None#

Check if the object is a valid Configuration. Raise an error if configuration is not valid.

items() a set-like object providing a view on D's items#
keys() List[str]#

Cache the keys to speed up the process of retrieving the keys.

Returns:

list of keys

Return type:

list(str)

values() an object providing a view on D's values#