Classical API
API reference for the 10 classes of opt.classical. This page is generated from the source; see the algorithm pages for formulations and references.
Imports
python
from opt.classical import (
BFGS,
ConjugateGradient,
HillClimbing,
LBFGS,
NelderMead,
Powell,
RandomSearch,
SimulatedAnnealing,
TabuSearch,
TrustRegion,
)Common interface
Every class takes the objective func, the search-space lower_bound, upper_bound and dim, usually max_iter and seed, and implements search() -> tuple[np.ndarray, float]. See AbstractOptimizer.
Classes
| Class | Algorithm | Additional parameters |
|---|---|---|
BFGS | Broyden-Fletcher-Goldfarb-Shanno | num_restarts=25 |
ConjugateGradient | Conjugate Gradient Method | num_restarts=10 |
HillClimbing | Hill Climbing | initial_step_sizes=1.0, acceleration=1.2, epsilon=1e-06 |
LBFGS | Limited-memory BFGS | num_restarts=25 |
NelderMead | Nelder-Mead Simplex Method | num_restarts=25 |
Powell | Powell's Conjugate Direction Method | num_restarts=10 |
RandomSearch | Random Search | - |
SimulatedAnnealing | Simulated Annealing | init_temperature=1000, stopping_temperature=1e-08, cooling_rate=0.99 |
TabuSearch | Tabu Search | tabu_list_size=50, neighborhood_size=10 |
TrustRegion | Trust Region Method | num_restarts=10, method='trust-constr' |