用于配置挑战者列表中随机配置交错的辅助类的抽象基类。
参数
seed : int 初始化此设计的随机种子。
源代码位于 smac/random_design/abstract_random_design.py
| def __init__(self, seed: int = 0):
self._seed = seed
self._rng = np.random.RandomState(seed=seed)
|
check abstractmethod
检查下一个配置是否应为随机配置。
参数
iteration : int 在 SMBO 迭代中评估的第 i 个配置的编号。
返回
bool 指示下一个配置是否应为随机配置。
源代码位于 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
指示下一个 SMBO 迭代的开始。
源代码位于 smac/random_design/abstract_random_design.py
| def next_iteration(self) -> None:
"""Indicates the beginning of the next SMBO iteration."""
pass
|