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.
- abstract inverse_transform(configurations: pandas.DataFrame) pandas.DataFrame [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
BaseOptimizer
class, and performs the inverse operation oftransform()
method.- Parameters:
configurations (pandas.DataFrame) – Dataframe of configurations / parameters, which belong to the original parameter space. The columns are the parameter names the original parameter space and the rows are the configurations.
- Returns:
configurations – Dataframe of the translated configurations / parameters. The columns are the parameter names of the target parameter space and the rows are the configurations.
- Return type:
- abstract transform(configuration: pandas.DataFrame) pandas.DataFrame [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 theBaseOptimizer
class.- Parameters:
configuration (pandas.DataFrame) – Pandas dataframe with a single row. Column names are the parameter names of the target parameter space.
- Returns:
configuration – Pandas dataframe with a single row, 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.