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
Return for a given hyperparameter name
item
the value of this hyperparameter.Return the internal vector representation of the
Configuration
.Return a representation of the
Configuration
in dictionary form.Check if the object is a valid
Configuration
.Cache the keys to speed up the process of retrieving the keys.
- get(item: unicode, default: None | Any = None) None | Any #
Return for a given hyperparameter name
item
the value of this hyperparameter.default
if the hyperparametername
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:
- 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 #
- values() an object providing a view on D's values #