Success criteria for trust-constr
[email protected] Wed, 09 Mar 2022 19:43:58 -0000
| Newsgroups | gmane.comp.python.scientific.user |
|---|---|
| Message-ID | <[email protected]> |
The `trust-constr` algorithm from `scipy.optimize.minimize` defines 4 stop criteria:
Termination status:
0 : The maximum number of function evaluations is exceeded.
1 : gtol termination condition is satisfied.
2 : xtol termination condition is satisfied.
3 : callback function requested termination.
From http://scipy.github.io/devdocs/reference/optimize.minimize-trustconstr.html?highlight=trust%20constr
The `OptimizeResult` object returned also contains a field `success`, which is filled in as follows:
# Status 3 occurs when the callback function requests termination,
# this is assumed to not be a success.
result.success = True if result.status in (1, 2) else False
From https://github.com/scipy/scipy/blob/a06cc0da56df9741105eedcd160b77f6f08236e1/scipy/optimize/_trustregion_constr/minimize_trustregion_constr.py#L524
I understand why status 1 is considered success (infinity norm of Lagrangian gradient and the constraint violation are smaller than `gtol`), but why is status 2 also considered success? The `xtol` criterium is satisfied when the trust region radius drops below `xtol`, 1e-8 by default, but it doesn't check the Lagrangian gradient to see if an extremum was reached or the constraint violation to see if the constraints are satisfied. It seems this criterium stops the algorithm because it doesn't make sense to iterate further, not because it reached a solution. What am I missing?
_______________________________________________
SciPy-User mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/scipy-user.python.org/
Member address: [email protected]