setup_genz_function¶
-
pyapprox.benchmarks.benchmarks.
setup_genz_function
(nvars, test_name, coefficients=None)[source]¶ Setup the Genz Benchmarks.
For example, the two-dimensional oscillatory Genz problem can be defined using
>>> from pyapprox.benchmarks.benchmarks import setup_benchmark >>> benchmark=setup_benchmark('genz',nvars=2,test_name='oscillatory') >>> print(benchmark.keys()) dict_keys(['fun', 'mean', 'variable'])
- Parameters
- nvarsinteger
The number of variables of the Genz function
- test_namestring
The test_name of the specific Genz function. See notes for options the string needed is given in brackets e.g. (‘oscillatory’)
- coefficientstuple (ndarray (nvars), ndarray (nvars))
The coefficients ci and wi If None (default) then cj=ˆcj(∑di=1ˆci)−1 where ˆci=(10−15(id)2))
- Returns
- benchmarkpya.Benchmark
Object containing the benchmark attributes
Notes
Corner Peak (‘corner-peak’)
f(z)=(1+d∑i=1cizi)−(d+1)Oscillatory (‘oscillatory’)
f(z)=cos(2πw1+d∑i=1cizi)Gaussian Peak (‘gaussian-peak’)
f(z)=exp(−d∑i=1c2i(zi−wi)2)Continuous (‘continuous’)
f(z)=exp(−d∑i=1ci|zi−wi|)Product Peak (‘product-peak’)
f(z)=d∏i=1(c−2i+(zi−wi)2)−1Discontinuous (‘discontinuous’)
f(z)={0x1>u1orx2>u2exp(∑di=1cizi)otherwiseReferences