setup_sobol_g_function

pyapprox.benchmarks.setup_sobol_g_function(nvars)[source]

Setup the Sobol-G function benchmark

\[f(z) = \prod_{i=1}^d\frac{\lvert 4z_i-2\rvert+a_i}{1+a_i}, \quad a_i=\frac{i-2}{2}\]

using

>>> from pyapprox.benchmarks.benchmarks import setup_benchmark
>>> benchmark=setup_benchmark('sobol_g',nvars=2)
>>> print(benchmark.keys())
dict_keys(['fun', 'mean', 'variance', 'main_effects', 'total_effects', 'variable'])
Parameters:
nvarsinteger

The number of variables of the Sobol-G function

Returns:
benchmarkBenchmark

Object containing the benchmark attributes

funcallable

The function being analyzed

variableJointVariable

Class containing information about each of the nvars inputs to fun

mean: np.ndarray (nvars)

The mean of the function with respect to the PDF of var

variance: np.ndarray (nvars)

The variance of the function with respect to the PDF of var

main_effectsnp.ndarray (nvars)

The variance based main effect sensitivity indices

total_effectsnp.ndarray (nvars)

The variance based total effect sensitivity indices

References