I really like this repository and used it in my Computational Intelligence course back in university. However, I wish that it also included a database for each benchmark method.
This would be really useful if someone would like to use and compare benchmark methods, but want to know how to draw meaningful conclusions from their tests. For instance, knowing what tags a benchmark method has (e.g. continuous vs discontinuous, non-convex vs convex etc) and knowing the dimension of the benchmark on hand would speed up the process of say concluding whether an algorithm performs better in lower dimensions, on convex landscapes etc.
Would you be interested if I attempted to add such a thing? This can either be by csv or by physically adding a list of dictionaries.
Here is a preview of what I suggest:
# this snippet only includes benchmarks from the multi_modal file for now
from opfunu.type_based import multi_modal
""" Links are retrieved from the following name spaces:
(ordered from most useful links to lease useful)
- https://www.sfu.ca/~ssurjano/optimization.html
- http://infinity77.net/global_optimization/test_functions.html
- https://github.com/mazhar-ansari-ardeh/BenchmarkFcns/blob/gh-pages/benchmarkfcns/
- http://benchmarkfcns.xyz
- https://www.indusmic.com/post/
A Literature Survey of Benchmark Functions For Global Optimization Problems (2013):
https://arxiv.org/pdf/1308.4008.pdf
"""
data = [
# Ackley
dict(
dimensions='d',
domain=[-32.768, 32.768],
latex=r"f(\textbf{x}) = f(x_1, ..., x_n)= -a.exp(-b\sqrt{\frac{1}{n}\sum_{i=1}^{n}x_i^2})-exp(\frac{1}{d}\sum_{i=1}^{n}cos(cx_i))+ a + exp(1)",
links=[
'http://benchmarkfcns.xyz/benchmarkfcns/ackleyfcn.html',
'https://github.com/mazhar-ansari-ardeh/BenchmarkFcns/blob/gh-pages/benchmarkfcns/ackleyfcn.markdown',
'https://www.sfu.ca/~ssurjano/ackley.html',
],
method=multi_modal.Functions()._ackley__,
minima=[dict(fx=0, x=0)],
name='Ackley',
references=[
'''Adorio, E. P., & Diliman, U. P. MVF - Multivariate Test Functions Library in C for Unconstrained Global Optimization (2005). Retrieved June 2013, from http://http://www.geocities.ws/eadorio/mvf.pdf.''',
'''Molga, M., & Smutnicki, C. Test functions for optimization needs (2005). Retrieved June 2013, from http://www.zsd.ict.pwr.wroc.pl/files/docs/functions.pdf.''',
'''Back, T. (1996). Evolutionary algorithms in theory and practice: evolution strategies, evolutionary programming, genetic algorithms. Oxford University Press on Demand.''',
],
tags=[
'continuous',
'non-convex',
'differentiable',
],
),
# Ackley N. 4
dict(
dimensions='d',
domain=[-35, 35],
latex=r"f(\textbf{x})=\sum_{i=1}^{n-1}\left( e^{-0.2}\sqrt{x_i^2+x_{i+1}^2} + 3\left( cos(2x_i) + sin(2x_{i+1}) \right) \right)",
links=[
'http://benchmarkfcns.xyz/benchmarkfcns/ackleyn4fcn.html',
'https://github.com/mazhar-ansari-ardeh/BenchmarkFcns/blob/gh-pages/benchmarkfcns/ackleyn4fcn.markdown',
],
method=multi_modal.Functions()._ackley_4__,
minima=[dict(fx=-4.590101633799122, x=[-1.51, -0.755])],
name='Ackley N. 4',
references=[
'''Momin Jamil and Xin-She Yang, A literature survey of benchmark functions for global optimization problems, Int. Journal of Mathematical Modelling and Numerical Optimisation}, Vol. 4, No. 2, pp. 150--194 (2013), arXiv:1308.4008''',
],
tags=[
'continuous',
'differentiable',
'non-separable',
'scalable',
],
),
# Alpine 1
dict(
dimensions='d',
domain=[-10, 10],
latex=r"f(\mathbf x)=f(x_1, ..., x_n)=\sum_{i=1}^{n}|x_i sin(x_i) + 0.1x_i|",
links=[
'http://benchmarkfcns.xyz/benchmarkfcns/alpinen1fcn.html'
'https://github.com/mazhar-ansari-ardeh/BenchmarkFcns/blob/gh-pages/benchmarkfcns/alpinen1fcn.markdown',
'http://infinity77.net/global_optimization/test_functions_nd_A.html#go_benchmark.Alpine01',
],
method=multi_modal.Functions()._alpine_1__,
minima=[dict(fx=0, x=0)],
name='Alpine 1',
references=[
'''Momin Jamil and Xin-She Yang, A literature survey of benchmark functions for global optimization problems, Int. Journal of Mathematical Modelling and Numerical Optimisation}, Vol. 4, No. 2, pp. 150--194 (2013), arXiv:1308.4008''',
'''M. Clerc, βThe Swarm and the Queen, Towards a Deterministic and Adaptive Particle Swarm Optimization, β IEEE Congress on Evolutionary Computation, Washington DC, USA, pp. 1951-1957, 1999.''',
],
tags=[
'continuous',
'non-differentiable',
'separable',
'non-scalable',
],
),
# Alpine 2
dict(
dimensions='d',
domain=[0, 10],
latex=r"f(\mathbf x)=f(x_1, ..., x_n) = \prod_{i=1}^{n}\sqrt{x_i}sin(x_i)",
links=[
'http://infinity77.net/global_optimization/test_functions_nd_A.html#go_benchmark.Alpine02',
'https://github.com/mazhar-ansari-ardeh/BenchmarkFcns/blob/gh-pages/benchmarkfcns/alpinen2fcn.markdown',
],
method=multi_modal.Functions()._alpine_2__,
minima=[dict(fx=-6.1295, x=7.917)],
name='Alpine 2',
references=[
'''Momin Jamil and Xin-She Yang, A literature survey of benchmark functions for global optimization problems, Int. Journal of Mathematical Modelling and Numerical Optimisation}, Vol. 4, No. 2, pp. 150--194 (2013), arXiv:1308.4008''',
'''M. Clerc, βThe Swarm and the Queen, Towards a Deterministic and Adaptive Particle Swarm Optimization, β IEEE Congress on Evolutionary Computation, Washington DC, USA, pp. 1951-1957, 1999.''',
],
tags=[
'multi-modal'
'differentiable',
'non-convex',
'non-separable',
],
),
# Cosine Mixture
dict(
dimensions='d',
domain=[-1, 1],
latex=r"f(\mathbf{x})=-0.1\sum_{i=1}^n\cos(5\pix_i)-\sum_{i=1}^{n}x_i^2",
links=[
'http://infinity77.net/global_optimization/test_functions_nd_C.html#go_benchmark.CosineMixture',
],
method=multi_modal.Functions()._cosine_mixture__,
minima=[dict(fx=lambda x: 0.1*len(x), x=0)],
name='Cosine Mixture',
references=[
'A Literature Survey of Benchmark Functions For Global Optimization Problems (2013)'
],
tags=[
'discontinuous',
'non-differentiable',
'separable',
'scalable',
'multi-modal',
],
),
# Csendes
dict(
dimensions=2,
domain=[-1, 1],
latex=r"f(\mathbf{x})=\sum_{i=1}^n x_i^6\left[2+\sin\left(\frac{1}{x_i}\right)\right]",
links=[
'http://infinity77.net/global_optimization/test_functions_nd_C.html#go_benchmark.Csendes',
],
method=multi_modal.Functions()._csendes__,
minima=[dict(fx=0, x=0)],
name='Csendes',
references=[
'A Literature Survey of Benchmark Functions For Global Optimization Problems (2013)'
],
tags=[
'continuous',
'differentiable',
'separable',
'scalable',
'multi-modal',
],
),
# TODO: add the methods in benchmark2d.py
# TODO: add the methods in benchmark3d.py
# TODO: add the methods in benchmarknd.py
# TODO: add the methods in multi_modal.py
# TODO: add the methods in uni_modal.py