mlos_core.spaces.adapters.adapter
Contains the BaseSpaceAdapter abstract class.
As mentioned in mlos_core.spaces.adapters, the space adapters provide a
mechanism for automatic transformation of the original
ConfigSpace.ConfigurationSpace provided to the Optimizer into a new
space for the Optimizer to search over.
It’s main APIs are the transform() and
inverse_transform() methods, which are used to translate
configurations from one space to another.
Classes
SpaceAdapter abstract class defining the basic interface. |
Module Contents
- class mlos_core.spaces.adapters.adapter.BaseSpaceAdapter(*, orig_parameter_space: ConfigSpace.ConfigurationSpace)[source]
SpaceAdapter abstract class defining the basic interface.
- Parameters:
orig_parameter_space (ConfigSpace.ConfigurationSpace) – The original parameter space to explore.
- abstractmethod inverse_transform(configuration: pandas.Series) pandas.Series[source]
Translates a configuration, which belongs to the original parameter space, to the target parameter space. This method is called by the register method of the
BaseOptimizerclass, and performs the inverse operation oftransform()method.- Parameters:
configuration (pandas.Series) – A Series of configuration parameters, which belong to the original parameter space. The indices are the parameter names the original parameter space and the rows are the configurations.
- Returns:
configuration – Series of the translated configurations / parameters. The indices are the parameter names of the target parameter space and the rows are the configurations.
- Return type:
- abstractmethod transform(configuration: pandas.Series) pandas.Series[source]
Translates a configuration, which belongs to the target parameter space, to the original parameter space. This method is called by the
suggest()method of theBaseOptimizerclass.- Parameters:
configuration (pandas.Series) – Pandas series. Column names are the parameter names of the target parameter space.
- Returns:
configuration – Pandas series, containing the translated configuration. Column names are the parameter names of the original parameter space.
- Return type:
- property orig_parameter_space: ConfigSpace.ConfigurationSpace[source]
Original (user-provided) parameter space to explore.
- Return type:
- property target_parameter_space: ConfigSpace.ConfigurationSpace[source]
- Abstractmethod:
- Return type:
Target parameter space that is fed to the underlying optimizer.