smac.acquisition.maximizer.local_and_random_search¶
Classes¶
|
Implement SMAC's default acquisition function optimization. |
Interfaces¶
- class smac.acquisition.maximizer.local_and_random_search.LocalAndSortedRandomSearch(configspace, acquisition_function=None, challengers=5000, max_steps=None, n_steps_plateau_walk=10, local_search_iterations=10, seed=0, uniform_configspace=None, prior_sampling_fraction=None)[source]¶
Bases:
AbstractAcquisitionMaximizer
Implement SMAC’s default acquisition function optimization.
This optimizer performs local search from the previous best points according to the acquisition function, uses the acquisition function to sort randomly sampled configurations. Random configurations are interleaved by the main SMAC code.
The Random configurations are interleaved to circumvent issues from a constant prediction from the Random Forest model at the beginning of the optimization process.
- Parameters:
configspace (ConfigurationSpace)
uniform_configspace (ConfigurationSpace) – A version of the user-defined ConfigurationSpace where all parameters are uniform (or have their weights removed in the case of a categorical hyperparameter). Can optionally be given and sampling ratios be defined via the prior_sampling_fraction parameter.
acquisition_function (AbstractAcquisitionFunction | None, defaults to None)
challengers (int, defaults to 5000) – Number of challengers.
max_steps (int | None, defaults to None) – [LocalSearch] Maximum number of steps that the local search will perform.
n_steps_plateau_walk (int, defaults to 10) – [LocalSearch] number of steps during a plateau walk before local search terminates.
local_search_iterations (int, defauts to 10) – [Local Search] number of local search iterations.
prior_sampling_fraction (float, defaults to 0.5) – The ratio of random samples that are taken from the user-defined ConfigurationSpace, as opposed to the uniform version (needs `uniform_configspace`to be defined).
seed (int, defaults to 0)
- property acquisition_function: AbstractAcquisitionFunction | None¶
Returns the used acquisition function.
- property meta: dict[str, Any]¶
Return the meta-data of the created object.