[SciPy-Dev] minimizer benchmark
Jacob Stevenson
jstevenson131 at gmail.com
Tue Nov 19 14:38:05 EST 2013
I added several more test functions to the benchmarking data (results
are below). Taking into account advice from earlier replied, I also
generalized the interface to easily make add new functions to test and
to average over multiple starting points.
My idea is that if this becomes part of the public repository more
functions can easily be added (e.g. by any of you). We could even make
several groups of benchmarks. e.g. problems with functions only,
problems with gradients, problems with constraints, etc.
Is this something people would want to see in scipy? Would you be
interested in contributing if if it was a separate repository?
Here is the link to the relevant code and the results from the new
benchmarking.
https://github.com/js850/scipy/blob/benchmarks/scipy/optimize/benchmarks/bench_optimizers.py
---------------------------------------------------------
Optimizer benchmark: Rosenbrock function
averaged over 10 starting configurations
Optimizer nfail nfev njev nhev time
---------------------------------------------------------
L-BFGS-B 0 35 0 0 0.00334594
SLSQP 0 51 35 0 0.00544584
BFGS 0 49 49 0 0.00776296
trust-ncg 0 45 40 39 0.0111956
Newton-CG 0 78 140 63 0.0229024
Powell 0 939 0 0 0.0497912
TNC 1 61 0 0 0.00444455
dogleg 3 17 15 14 0.00463629
CG 3 93 90 0 0.0100623
COBYLA 9 905 0 0 0.0247099
---------------------------------------------------------
Optimizer benchmark: simple quadratic function
averaged over 10 starting configurations
Optimizer nfail nfev njev nhev time
---------------------------------------------------------
TNC 0 7 0 0 0.000121212
L-BFGS-B 0 3 0 0 0.000132966
SLSQP 0 3 2 0 0.000221419
CG 0 5 5 0 0.00023191
COBYLA 0 64 0 0 0.000245976
BFGS 0 4 4 0 0.000284338
trust-ncg 0 3 3 2 0.000300932
Newton-CG 0 3 4 2 0.000332808
dogleg 0 3 3 2 0.000438738
Powell 0 52 0 0 0.00148728
---------------------------------------------------------
Optimizer benchmark: function sum(x**2) + x[0]
averaged over 10 starting configurations
Optimizer nfail nfev njev nhev time
---------------------------------------------------------
L-BFGS-B 0 3 0 0 0.000148368
TNC 0 12 0 0 0.000190687
SLSQP 0 3 2 0 0.000227571
CG 0 4 4 0 0.00024004
COBYLA 0 62 0 0 0.000283909
BFGS 0 3 3 0 0.000284839
trust-ncg 0 3 3 2 0.000315571
Newton-CG 0 3 4 2 0.000344849
dogleg 0 3 3 2 0.000449395
Powell 0 135 0 0 0.00436816
---------------------------------------------------------
Optimizer benchmark: 1d sin function
averaged over 10 starting configurations
Optimizer nfail nfev njev nhev time
---------------------------------------------------------
COBYLA 0 23 0 0 0.000144291
TNC 0 10 0 0 0.000207186
L-BFGS-B 0 6 0 0 0.000222659
CG 0 5 5 0 0.000294614
SLSQP 0 4 3 0 0.000340533
BFGS 0 5 5 0 0.000469255
Powell 0 37 0 0 0.00122664
---------------------------------------------------------
Optimizer benchmark: Booth's function
averaged over 10 starting configurations
Optimizer nfail nfev njev nhev time
---------------------------------------------------------
TNC 0 6 0 0 0.000252295
L-BFGS-B 0 5 0 0 0.000304174
CG 0 5 5 0 0.000353932
BFGS 0 5 5 0 0.000439787
SLSQP 0 7 5 0 0.000566912
COBYLA 0 63 0 0 0.000614142
Powell 0 67 0 0 0.00229499
checking gradient 7.00777666894e-06
---------------------------------------------------------
Optimizer benchmark: Beale's function
averaged over 10 starting configurations
Optimizer nfail nfev njev nhev time
---------------------------------------------------------
L-BFGS-B 0 25 0 0 0.00166378
TNC 1 37 0 0 0.00172372
SLSQP 1 33 21 0 0.00265439
COBYLA 2 336 0 0 0.00415859
BFGS 3 180 180 0 0.0245004
CG 4 103 99 0 0.00788155
Powell 8 1829 0 0 0.071332
checking gradient 1.53950157701e-08
---------------------------------------------------------
Optimizer benchmark: 4 atom Lennard Jones potential
averaged over 10 starting configurations
Optimizer nfail nfev njev nhev time
---------------------------------------------------------
L-BFGS-B 0 54 0 0 0.0231662
SLSQP 0 113 38 0 0.0295753
BFGS 0 73 73 0 0.0356844
Powell 0 2401 0 0 0.372276
CG 1 104 103 0 0.0457192
TNC 6 112 0 0 0.0459664
COBYLA 7 864 0 0 0.112254
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20131119/a7d4fd47/attachment.html>
More information about the SciPy-Dev
mailing list