mlos_core.spaces.adapters.adapter.BaseSpaceAdapter

class mlos_core.spaces.adapters.adapter.BaseSpaceAdapter(*, orig_parameter_space: ConfigurationSpace)

SpaceAdapter abstract class defining the basic interface.

Parameters:
orig_parameter_spaceConfigSpace.ConfigurationSpace

The original parameter space to explore.

Attributes:
orig_parameter_space

Original (user-provided) parameter space to explore.

target_parameter_space

Target parameter space that is fed to the underlying optimizer.

Methods

inverse_transform(configurations)

Translates a configuration, which belongs to the original parameter space, to the target parameter space.

transform(configuration)

Translates a configuration, which belongs to the target parameter space, to the original parameter space.

__init__(*, orig_parameter_space: ConfigurationSpace)
abstract inverse_transform(configurations: DataFrame) DataFrame

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 of BaseSpaceAdapter.transform method.

Parameters:
configurationspd.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:
configurationspd.DataFrame

Dataframe of the translated configurations / parameters. The columns are the parameter names of the target parameter space and the rows are the configurations.

property orig_parameter_space: ConfigurationSpace

Original (user-provided) parameter space to explore.

abstract property target_parameter_space: ConfigurationSpace

Target parameter space that is fed to the underlying optimizer.

abstract transform(configuration: DataFrame) DataFrame

Translates a configuration, which belongs to the target parameter space, to the original parameter space. This method is called by the suggest method of the BaseOptimizer class.

Parameters:
configurationpd.DataFrame

Pandas dataframe with a single row. Column names are the parameter names of the target parameter space.

Returns:
configurationpd.DataFrame

Pandas dataframe with a single row, containing the translated configuration. Column names are the parameter names of the original parameter space.