smac.facade.algorithm_configuration_facade¶
Classes¶
|
Interfaces¶
- class smac.facade.algorithm_configuration_facade.AlgorithmConfigurationFacade(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
- static get_acquisition_function(scenario, *, xi=0.0)[source]¶
Returns an Expected Improvement acquisition function.
- static get_acquisition_maximizer(scenario)[source]¶
Returns local and sorted random search as acquisition maximizer.
- 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_config_calls=1, max_config_calls=2000, min_challenger=1, intensify_percentage=0.5)[source]¶
Returns
Intensifier
as intensifier. Uses the default configuration forrace_against
.- Parameters:
scenario (Scenario) –
min_config_calls (int, defaults to 1) – Minimum number of trials per config (summed over all calls to intensify).
max_config_calls (int, defaults to 2000) – Maximum number of trials per config (summed over all calls to intensify).
min_challenger (int, defaults to 2) – Minimal number of challengers to be considered (even if time_bound is exhausted earlier).
intensify_percentage (float, defaults to 0.5) – How much percentage of the time should configurations be intensified (evaluated on higher budgets or more instances). This parameter is accessed in the SMBO class.
- Return type:
- static get_model(scenario, *, n_trees=10, ratio_features=0.8333333333333334, min_samples_split=3, min_samples_leaf=3, max_depth=20, bootstrapping=True, pca_components=4)[source]¶
Returns a random forest as surrogate model.
- Parameters:
n_trees (int, defaults to 10) – The number of trees in the random forest.
ratio_features (float, defaults to 5.0 / 6.0) – The ratio of features that are considered for splitting.
min_samples_split (int, defaults to 3) – The minimum number of data points to perform a split.
min_samples_leaf (int, defaults to 3) – The minimum number of data points in a leaf.
max_depth (int, defaults to 20) – The maximum depth of a single tree.
bootstrapping (bool, defaults to True) – Enables bootstrapping.
pca_components (float, defaults to 4) – Number of components to keep when using PCA to reduce dimensionality of instance features.
- 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, *, probability=0.5)[source]¶
Returns
ProbabilityRandomDesign
for interleaving configurations.- Parameters:
probability (float, defaults to 0.5) – Probability that a configuration will be drawn at random.
- Return type: