Local search
smac.acquisition.maximizer.local_search
#
LocalSearch
#
LocalSearch(
configspace: ConfigurationSpace,
acquisition_function: (
AbstractAcquisitionFunction | None
) = None,
challengers: int = 5000,
max_steps: int | None = None,
n_steps_plateau_walk: int = 10,
vectorization_min_obtain: int = 2,
vectorization_max_obtain: int = 64,
seed: int = 0,
n_jobs: int = 1,
stdev_init: float = 0.05,
stdev_min: float = 0.005,
stdev_max: float | None = None,
upscale_thresh: int = 3,
downscale_interval: int = 3,
)
Bases: AbstractAcquisitionMaximizer
Implementation of SMAC's local search.
| PARAMETER | DESCRIPTION |
|---|---|
configspace
|
TYPE:
|
acquisition_function
|
TYPE:
|
challengers
|
Number of challengers.
TYPE:
|
max_steps
|
Maximum number of iterations that the local search will perform.
TYPE:
|
n_steps_plateau_walk
|
Number of steps during a plateau walk before local search terminates.
TYPE:
|
vectorization_min_obtain
|
Minimal number of neighbors to obtain at once for each local search for vectorized calls. Can be tuned to reduce the overhead of SMAC.
TYPE:
|
vectorization_max_obtain
|
Maximal number of neighbors to obtain at once for each local search for vectorized calls. Can be tuned to reduce the overhead of SMAC.
TYPE:
|
seed
|
TYPE:
|
n_jobs
|
Number of parallel workers to use for local search evaluation.
TYPE:
|
stdev_init
|
Initial standard deviation used when sampling neighbors for continuous hyperparameters during local search.
TYPE:
|
stdev_min
|
Minimum allowed standard deviation for neighborhood sampling.
TYPE:
|
stdev_max
|
Maximum allowed standard deviation for neighborhood sampling.
If None, the value is automatically set to
TYPE:
|
upscale_thresh
|
Number of consecutive improvements required before increasing the standard deviation.
TYPE:
|
downscale_interval
|
Number of plateau walk steps between reductions of the standard deviation.
TYPE:
|
Source code in smac/acquisition/maximizer/local_search.py
acquisition_function
property
writable
#
acquisition_function: AbstractAcquisitionFunction | None
The acquisition function used for maximization.
maximize
#
maximize(
previous_configs: list[Configuration],
n_points: int | None = None,
random_design: AbstractRandomDesign | None = None,
) -> Iterator[Configuration]
Maximize acquisition function using _maximize, implemented by a subclass.
| PARAMETER | DESCRIPTION |
|---|---|
previous_configs
|
Previous evaluated configurations.
TYPE:
|
n_points
|
Number of points to be sampled & number of configurations to be returned. If
TYPE:
|
random_design
|
Part of the returned ChallengerList such that we can interleave random configurations
by a scheme defined by the random design. The method
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
challengers
|
An iterable consisting of configurations.
TYPE:
|