smac.acquisition.maximizer.local_and_random_search¶
Classes¶
|
Implements SMAC's default acquisition function optimization. |
|
Implements SMAC's default acquisition function optimization. |
Interfaces¶
- class smac.acquisition.maximizer.local_and_random_search.LocalAndSortedPriorRandomSearch(configspace, uniform_configspace, acquisition_function=None, challengers=5000, max_steps=None, n_steps_plateau_walk=10, local_search_iterations=10, prior_sampling_fraction=0.5, seed=0)[source]¶
Bases:
AbstractAcquisitionMaximizer
Implements 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 retrieved from two different ConfigurationSpaces - one which uses priors (e.g. NormalFloatHP) and is defined by the user, and one that is a uniform version of the same space, i.e. with the priors removed.
- Parameters:
configspace (ConfigurationSpace) – The original ConfigurationSpace specified by the user.
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).
acquisition_function (AbstractAcquisitionFunction | None, defaults to None) –
challengers (int, defaults to 5000) – Number of challengers.
max_steps (int, 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, defaults 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.
seed (int, defaults to 0) –
- 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)[source]¶
Bases:
AbstractAcquisitionMaximizer
Implements 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.
- Parameters:
configspace (ConfigurationSpace) –
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
seed (int, defaults to 0) –
- property acquisition_function: smac.acquisition.function.abstract_acquisition_function.AbstractAcquisitionFunction | None¶
Returns the used acquisition function.
- Return type:
Optional
[AbstractAcquisitionFunction
]
- property meta: dict[str, Any]¶
Returns the meta data of the created object.
- Return type:
dict
[str
,Any
]