smac.initial_design

Interfaces

class smac.initial_design.AbstractInitialDesign(scenario, n_configs=None, n_configs_per_hyperparameter=10, max_ratio=0.25, additional_configs=None, seed=None)[source]

Bases: object

Base class for initial design strategies that evaluates multiple configurations.

Parameters:
  • scenario (Scenario)

  • n_configs (int | None, defaults to None) – Number of initial configurations (disables the arguments n_configs_per_hyperparameter).

  • n_configs_per_hyperparameter (int, defaults to 10) – Number of initial configurations per hyperparameter. For example, if my configuration space covers five hyperparameters and n_configs_per_hyperparameter is set to 10, then 50 initial configurations will be samples.

  • max_ratio (float, defaults to 0.25) – Use at most scenario.n_trials * max_ratio number of configurations in the initial design. Additional configurations are not affected by this parameter.

  • additional_configs (list[Configuration], defaults to []) – Adds additional configurations to the initial design.

  • seed (int | None, default to None)

property meta: dict[str, Any]

Returns the meta data of the created object.

select_configurations()[source]

Selects the initial configurations. Internally, _select_configurations is called, which has to be implemented by the child class.

Returns:

configs – Configurations from the child class.

Return type:

list[Configuration]

class smac.initial_design.DefaultInitialDesign(scenario, n_configs=None, n_configs_per_hyperparameter=10, max_ratio=0.25, additional_configs=None, seed=None)[source]

Bases: AbstractInitialDesign

Initial design that evaluates only the default configuration.

class smac.initial_design.FactorialInitialDesign(scenario, n_configs=None, n_configs_per_hyperparameter=10, max_ratio=0.25, additional_configs=None, seed=None)[source]

Bases: AbstractInitialDesign

Factorial initial design to select corner and middle configurations.

class smac.initial_design.LatinHypercubeInitialDesign(scenario, n_configs=None, n_configs_per_hyperparameter=10, max_ratio=0.25, additional_configs=None, seed=None)[source]

Bases: AbstractInitialDesign

Latin Hypercube initial design. See https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.qmc.LatinHypercube.html for further information.

class smac.initial_design.RandomInitialDesign(scenario, n_configs=None, n_configs_per_hyperparameter=10, max_ratio=0.25, additional_configs=None, seed=None)[source]

Bases: AbstractInitialDesign

Initial design that evaluates random configurations.

class smac.initial_design.SobolInitialDesign(*args, **kwargs)[source]

Bases: AbstractInitialDesign

Sobol sequence design with a scrambled Sobol sequence. See https://scipy.github.io/devdocs/reference/generated/scipy.stats.qmc.Sobol.html for further information.

Modules

smac.initial_design.abstract_initial_design

smac.initial_design.default_design

smac.initial_design.factorial_design

smac.initial_design.latin_hypercube_design

smac.initial_design.random_design

smac.initial_design.sobol_design