smac.facade.random_facade¶
Classes¶
|
Facade to use Random Online Aggressive Racing (ROAR). |
Interfaces¶
- class smac.facade.random_facade.RandomFacade(scenario, target_function, *, model=None, acquisition_function=None, acquisition_maximizer=None, initial_design=None, random_design=None, intensifier=None, multi_objective_algorithm=None, runhistory_encoder=None, logging_level=None, callbacks=[], overwrite=False)[source]¶
Bases:
AbstractFacade
Facade to use Random Online Aggressive Racing (ROAR).
Aggressive Racing: When we have a new configuration θ, we want to compare it to the current best configuration, the incumbent θ*. ROAR uses the ‘racing’ approach, where we run few times for unpromising θ and many times for promising configurations. Once we are confident enough that θ is better than θ*, we update the incumbent θ* ⟵ θ. Aggressive means rejecting low-performing configurations very early, often after a single run. This together is called aggressive racing.
ROAR Loop: The main ROAR loop looks as follows:
Select a configuration θ uniformly at random.
Compare θ to incumbent θ* online (one θ at a time):
Reject/accept θ with aggressive racing
Setup: Uses a random model and random search for the optimization of the acquisition function.
Note
The surrogate model and the acquisition function is not used during the optimization and therefore replaced by dummies.
- static get_acquisition_function(scenario)[source]¶
The random facade is not using an acquisition function. Therefore, we simply return a dummy function.
- Return type:
- static get_acquisition_maximizer(scenario)[source]¶
We return
RandomSearch
as maximizer which samples configurations randomly from the configuration space and therefore neither uses the acquisition function nor the model.- Return type:
- static get_initial_design(scenario, *, additional_configs=[])[source]¶
Returns an initial design, which returns the default configuration.
- Parameters:
additional_configs (list[Configuration], defaults to []) – Adds additional configurations to the initial design.
- Return type:
- static get_intensifier(scenario, *, min_challenger=1, min_config_calls=1, max_config_calls=3, intensify_percentage=0.5)[source]¶
Returns
Intensifier
as intensifier. Uses the default configuration forrace_against
.Note
Please use
HyperbandFacade
if you want to incorporate budgets.Warning
If you are in an algorithm configuration setting, consider increasing
max_config_calls
.- Return type:
- static get_model(scenario)[source]¶
The model is used in the acquisition function. Since we do not use an acquisition function, we return a dummy model (returning random values in this case).
- Return type:
- static get_multi_objective_algorithm(scenario, *, objective_weights=None)[source]¶
Returns the mean aggregation strategy for the multi objective algorithm.
- Parameters:
scenario (Scenario) –
objective_weights (list[float] | None, defaults to None) – Weights for an weighted average. Must be of the same length as the number of objectives.
- Return type:
- static get_random_design(scenario)[source]¶
Just like the acquisition function, we do not use a random design. Therefore, we return a dummy design.
- Return type: