Skip to content

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 ​

ClassAlgorithmAdditional parameters
BFGSBroyden-Fletcher-Goldfarb-Shannonum_restarts=25
ConjugateGradientConjugate Gradient Methodnum_restarts=10
HillClimbingHill Climbinginitial_step_sizes=1.0, acceleration=1.2, epsilon=1e-06
LBFGSLimited-memory BFGSnum_restarts=25
NelderMeadNelder-Mead Simplex Methodnum_restarts=25
PowellPowell's Conjugate Direction Methodnum_restarts=10
RandomSearchRandom Search-
SimulatedAnnealingSimulated Annealinginit_temperature=1000, stopping_temperature=1e-08, cooling_rate=0.99
TabuSearchTabu Searchtabu_list_size=50, neighborhood_size=10
TrustRegionTrust Region Methodnum_restarts=10, method='trust-constr'

Released under the MIT License.