| 1 | initial version |
If you use the algorithm="simplex" option, it uses the optimize.fmin command, and passes any arguments you specify into fmin. The simplex method is default for python functions, but the bfgs method is default for symbolic expressions.
sage: minimize(f,[.5],algorithm='simplex')
Optimization terminated successfully.
Current function value: 0.000000
Iterations: 16
Function evaluations: 32
(1.0)
sage: def callback(xk):
....: print xk
....:
sage: minimize(f,[.5],algorithm='simplex',callback=callback)
[ 0.575]
[ 0.675]
[ 0.875]
[ 1.075]
[ 0.975]
[ 0.975]
[ 1.]
[ 1.]
[ 1.]
[ 1.]
[ 1.]
[ 1.]
[ 1.]
[ 1.]
[ 1.]
Optimization terminated successfully.
Current function value: 0.000000
Iterations: 16
Function evaluations: 32
(1.0)
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.