Skip to content

Abstract random design

smac.random_design.abstract_random_design #

AbstractRandomDesign #

AbstractRandomDesign(seed: int = 0)

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

Parameters#

seed : int The random seed initializing this design.

Source code in smac/random_design/abstract_random_design.py
def __init__(self, seed: int = 0):
    self._seed = seed
    self._rng = np.random.RandomState(seed=seed)

meta property #

meta: dict[str, Any]

Returns the meta data of the created object.

check abstractmethod #

check(iteration: int) -> bool

Check, if the next configuration should be random.

Parameters#

iteration : int Number of the i-th configuration evaluated in an SMBO iteration.

Returns#

bool Whether the next configuration should be random.

Source code in smac/random_design/abstract_random_design.py
@abstractmethod
def check(self, iteration: int) -> bool:
    """Check, if the next configuration should be random.

    Parameters
    ----------
    iteration : int
        Number of the i-th configuration evaluated in an SMBO iteration.

    Returns
    -------
    bool
        Whether the next configuration should be random.
    """
    pass

next_iteration #

next_iteration() -> None

Indicates the beginning of the next SMBO iteration.

Source code in smac/random_design/abstract_random_design.py
def next_iteration(self) -> None:
    """Indicates the beginning of the next SMBO iteration."""
    pass