smac.optimizer.random_configuration_chooser module

class smac.optimizer.random_configuration_chooser.ChooserCosineAnnealing(rng: numpy.random.mtrand.RandomState, prob_max: float, prob_min: float, restart_iteration: int)[source]

Bases: smac.optimizer.random_configuration_chooser.RandomConfigurationChooser

Interleave a random configuration according to a given probability which is decreased according to a cosine annealing schedule.

Parameters
  • prob_max (float) – Initial probility of a random configuration

  • prob_min (float) – Lowest probility of a random configuration

  • restart_iteration (int) – Restart the annealing schedule every restart_iteration iterations.

  • rng (np.random.RandomState) – Random state

_abc_impl = <_abc_data object>
check(iteration: int) → bool[source]

Check if the next configuration should be at random

next_smbo_iteration() → None[source]

Indicate beginning of next SMBO iteration

class smac.optimizer.random_configuration_chooser.ChooserLinearCoolDown(rng: numpy.random.mtrand.RandomState, start_modulus: float = 2.0, modulus_increment: float = 0.3, end_modulus: float = inf)[source]

Bases: smac.optimizer.random_configuration_chooser.RandomConfigurationChooser

Interleave a random configuration, decreasing the fraction of random configurations over time.

Parameters
  • start_modulus (float) – Initially, every modulus-th configuration will be at random

  • modulus_increment (float) – Increase modulus by this amount in every iteration

  • end_modulus (float) – Highest modulus used in the chooser. If the value is reached before the optimization is over, it is not further increased. If it is not reached before the optimization is over, there will be no adjustment to make sure that the end_modulus is reached.

_abc_impl = <_abc_data object>
check(iteration: int) → bool[source]

Check if the next configuration should be at random

next_smbo_iteration() → None[source]

Indicate beginning of next SMBO iteration

class smac.optimizer.random_configuration_chooser.ChooserNoCoolDown(rng: numpy.random.mtrand.RandomState, modulus: float = 2.0)[source]

Bases: smac.optimizer.random_configuration_chooser.RandomConfigurationChooser

Interleave a random configuration after a constant number of configurations found by Bayesian optimization.

Parameters

modulus (float) – Every modulus-th configuration will be at random.

_abc_impl = <_abc_data object>
check(iteration: int) → bool[source]

Check if the next configuration should be at random

next_smbo_iteration() → None[source]

Indicate beginning of next SMBO iteration

class smac.optimizer.random_configuration_chooser.ChooserProb(rng: numpy.random.mtrand.RandomState, prob: float)[source]

Bases: smac.optimizer.random_configuration_chooser.RandomConfigurationChooser

Interleave a random configuration according to a given probability.

Parameters
  • prob (float) – Probility of a random configuration

  • rng (np.random.RandomState) – Random state

_abc_impl = <_abc_data object>
check(iteration: int) → bool[source]

Check if the next configuration should be at random

next_smbo_iteration() → None[source]

Indicate beginning of next SMBO iteration

class smac.optimizer.random_configuration_chooser.ChooserProbCoolDown(rng: numpy.random.mtrand.RandomState, prob: float, cool_down_fac: float)[source]

Bases: smac.optimizer.random_configuration_chooser.RandomConfigurationChooser

Interleave a random configuration according to a given probability which is decreased over time.

Parameters
  • prob (float) – Probility of a random configuration

  • cool_down_fac (float) – Multiply the prob by cool_down_fac in each iteration

  • rng (np.random.RandomState) – Random state

_abc_impl = <_abc_data object>
check(iteration: int) → bool[source]

Check if the next configuration should be at random

next_smbo_iteration() → None[source]

Indicate beginning of next SMBO iteration

class smac.optimizer.random_configuration_chooser.RandomConfigurationChooser(rng: numpy.random.mtrand.RandomState)[source]

Bases: abc.ABC

Abstract base of helper classes to configure interleaving of random configurations in a list of challengers.

_abc_impl = <_abc_data object>
abstract check(iteration: int) → bool[source]

Check if the next configuration should be at random

abstract next_smbo_iteration() → None[source]

Indicate beginning of next SMBO iteration