Differential evolution
smac.acquisition.maximizer.differential_evolution
#
DifferentialEvolution
#
DifferentialEvolution(
configspace: ConfigurationSpace,
acquisition_function: (
AbstractAcquisitionFunction | None
) = None,
max_iter: int = 1000,
challengers: int = 50000,
strategy: str = "best1bin",
polish: bool = True,
mutation: tuple[float, float] = (0.5, 1.0),
recombination: float = 0.7,
seed: int = 0,
)
Bases: AbstractAcquisitionMaximizer
Get candidate solutions via DifferentialEvolutionSolvers from scipy.
According to scipy 1.9.2 documentation:
'Finds the global minimum of a multivariate function. Differential Evolution is stochastic in nature (does not use gradient methods) to find the minimum, and can search large areas of candidate space, but often requires larger numbers of function evaluations than conventional gradient-based techniques. The algorithm is due to Storn and Price [1].'
[1] Storn, R and Price, K, Differential Evolution - a Simple and Efficient Heuristic for Global Optimization over Continuous Spaces, Journal of Global Optimization, 1997, 11, 341 - 359.
| PARAMETER | DESCRIPTION |
|---|---|
configspace
|
TYPE:
|
acquisition_function
|
TYPE:
|
challengers
|
Number of challengers.
TYPE:
|
max_iter
|
Maximum number of iterations that the DE will perform.
TYPE:
|
strategy
|
The strategy to use for the DE.
TYPE:
|
polish
|
Whether to polish the final solution using L-BFGS-B.
TYPE:
|
mutation
|
The mutation constant. |
recombination
|
The recombination constant.
TYPE:
|
seed
|
TYPE:
|
Source code in smac/acquisition/maximizer/differential_evolution.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:
|
Source code in smac/acquisition/maximizer/abstract_acquisition_maximizer.py
check_kwarg
#
Checks if a given class accepts a specific keyword argument in its init method.
| PARAMETER | DESCRIPTION |
|---|---|
cls
|
The class to inspect.
TYPE:
|
kwarg_name
|
The name of the keyword argument to check.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
bool
|
True if the class's init method accepts the keyword argument, otherwise False. |