ampgo¶
- TRXASprefitpack.driver.ampgo(fun: Callable, x0: ndarray, tot_iter: Optional[int] = 20, max_tunnel: Optional[int] = 5, tol_tunnel: Optional[float] = 1e-05, minimizer_kwargs: Optional[dict] = None, eps1: Optional[float] = 0.02, eps2: Optional[float] = 0.1, n_tabu: Optional[int] = 5, strategy: Optional[str] = 'farthest', seed: Optional[Union[int, RandomState]] = None, callback: Optional[Callable] = None, disp: Optional[bool] = False) OptimizeResult[source]¶
- ampgo: Adaptive Memory Programming for Global Optimization
Based on Tabu Tunneling Method
- Parameters
fun – Objective function. Objective function should have following form f(x, *args)
x0 – initial guess
tot_iter – maximum number of global iteration
max_tunnel – maximum number of tunneling phase
tol_tunnel – Tolerance to determine whether tunneling phase is successful or not. If \(f(x_{best}) \geq 0\) and \(f(x_{tunnel}) < (1+{tol})f(x_{best})+{tol}\) or \(f(x_{best}) < 0\) and \(f(x_{tunnel}) < (1-{tol})f(x_{best})+{tol}\) then such tunneling phase is regarded as successful phase.
minimizer_kwargs –
Extra keyword arguments to be passed to the local minimizer scipy.optimize.minimize. Some important options could be:
method (str): The minimization Method (default: L-BFGS-B)
args (tuple): The extra arguments passed to the objective function (fun) and its derivatives (jac, hess)
jac: jacobian of objective function (see scipy.optimize.minimize)
hess: hessian of objective function (see scipy.optimize.minimize)
bounds (Sequence of Tuple): Boundary of variable (see scipy.optimize.minimize)
eps1 – Constant used to define aspiration value
eps2 – Perturbation factor used to move away from the latest local minimum
n_tabu – size of tabulist
strategy ({'farthest', 'oldest'}) –
The strategy to delete element of tabulist when the size of tabulist exceeds n_tabu.
farthest: Delete farthest point from the latest local minimum point
oldest: Delete oldest point
seed – seed used for random perturbation of local minimum. This argument is useful when someone wants to reproduce optimization results.
callback – callback function to monitor each global iteration and tunneling phase. function signature should be callback(x, f_val)
disp – display level, If zero or None, then no output is printed on screen. If postive number then status messages are printed.
- Returns
The optimization results represented as a scipy.OptimizeResult object. The important attributes are
x: The solution of the optimization
fun: values of objective fuction.
success: Whether or not the optimizer exited successfuly
message: Description of the cause of the termination
Note
The implementation of ampgo method is based on L. Lasdon et al. Computers & Operations Research 37 (2010) 1500–1509. and Andrea Gavana’s Python Implementation.