SALib.test_functions package#

Submodules#

SALib.test_functions.Ishigami module#

SALib.test_functions.Ishigami.evaluate(X: ndarray, A: float = 7.0, B: float = 0.1) ndarray[source]#

Non-monotonic Ishigami-Homma three parameter test function:

f(x) = sin(x_{1}) + A sin(x_{2})^2 + Bx^{4}_{3}sin(x_{1})

This test function is commonly used to benchmark global sensitivity methods as variance-based sensitivities of this function can be analytically determined.

See listed references below.

In [2], the expected first-order indices are:

x1: 0.3139 x2: 0.4424 x3: 0.0

when A = 7, B = 0.1 when conducting Sobol’ analysis with the Saltelli sampling method with a sample size of 1000.

Parameters:
  • X (np.ndarray) – An N*D array holding values for each parameter, where N is the number of samples and D is the number of parameters (in this case, three).

  • A (float) – Constant A parameter

  • B (float) – Constant B parameter

Returns:

Y

Return type:

np.ndarray

References

[1]

Ishigami, T., Homma, T., 1990. An importance quantification technique in uncertainty analysis for computer models. Proceedings. First International Symposium on Uncertainty Modeling and Analysis. https://doi.org/10.1109/ISUMA.1990.151285

[2]

Saltelli, A., Ratto, M., Andres, T., Campolongo, F., Cariboni, J., Gatelli, D., Saisana, M., Tarantola, S., 2008. Global Sensitivity Analysis: The Primer. Wiley, West Sussex, U.K. https://dx.doi.org/10.1002/9780470725184

SALib.test_functions.Sobol_G module#

SALib.test_functions.Sobol_G.evaluate(values, a=None, delta=None, alpha=None)[source]#

Modified Sobol G-function.

Reverts to original Sobol G-function if delta and alpha are not given.

[1]

Saltelli, A., Annoni, P., Azzini, I., Campolongo, F., Ratto, M., Tarantola, S., 2010. Variance based sensitivity analysis of model output. Design and estimator for the total sensitivity index. Computer Physics Communications 181, 259–270. https://doi.org/10.1016/j.cpc.2009.09.018

Parameters:
Returns:

Y

Return type:

Result of G-function

SALib.test_functions.Sobol_G.sensitivity_index(a, alpha=None)[source]#
SALib.test_functions.Sobol_G.total_sensitivity_index(a, alpha=None)[source]#

SALib.test_functions.lake_problem module#

SALib.test_functions.lake_problem.evaluate(values: ndarray, nvars: int = 100, seed=101)[source]#

Evaluate the Lake Problem with an array of parameter values.

Parameters:
  • values (np.ndarray,) – model inputs in the (column) order of a, q, b, mean, stdev, delta, alpha

  • nvars (int,) – number of decision variables to simulate (default: 100)

Returns:

np.ndarray

Return type:

max_P, utility, inertia, reliability

SALib.test_functions.lake_problem.evaluate_lake(values: ndarray, seed=101) ndarray[source]#

Evaluate the Lake Problem with an array of parameter values.

References

[1]

Hadka, D., Herman, J., Reed, P., Keller, K., (2015). “An open source framework for many-objective robust decision making.” Environmental Modelling & Software 74, 114–129. doi:10.1016/j.envsoft.2015.07.014

[2]

Singh, R., Reed, P., Keller, K., (2015). “Many-objective robust decision making for managing an ecosystem with a deeply uncertain threshold response.” Ecology and Society 20. doi:10.5751/ES-07687-200312

Parameters:

values (np.ndarray,) –

model inputs in the (column) order of a, q, b, mean, stdev

where * a is rate of anthropogenic pollution * q is exponent controlling recycling rate * b is decay rate for phosphorus * mean and * stdev set the log normal distribution of eps, see [2]

Return type:

np.ndarray, of Phosphorus pollution over time t

SALib.test_functions.lake_problem.lake_problem(X: float | array, a: float | array = 0.1, q: float | array = 2.0, b: float | array = 0.42, eps: float | array = 0.02) float[source]#

Lake Problem as given in Hadka et al., (2015) and Kwakkel (2017) modified for use as a test function.

The mean and stdev parameters control the log normal distribution of natural inflows (epsilon in [1] and [2]).

References

[1]

Hadka, D., Herman, J., Reed, P., Keller, K., (2015). “An open source framework for many-objective robust decision making.” Environmental Modelling & Software 74, 114-129. doi:10.1016/j.envsoft.2015.07.014

[2]

Kwakkel, J.H, (2017). “The Exploratory Modeling Workbench: An open source toolkit for exploratory modeling, scenario discovery, and (multi-objective) robust decision making.” Environmental Modelling & Software 96, 239-250. doi:10.1016/j.envsoft.2017.06.054

[3]

Singh, R., Reed, P., Keller, K., (2015). “Many-objective robust decision making for managing an ecosystem with a deeply uncertain threshold response.” Ecology and Society 20. doi:10.5751/ES-07687-200312

Parameters:
  • X (float or np.ndarray) – normalized concentration of Phosphorus at point in time

  • a (float or np.ndarray) – rate of anthropogenic pollution (0.0 to 0.1)

  • q (float or np.ndarray) – exponent controlling recycling rate (2.0 to 4.5).

  • b (float or np.ndarray) – decay rate for phosphorus (0.1 to 0.45, where default 0.42 is irreversible, as described in [1])

  • eps (float or np.ndarray) – natural inflows of phosphorus (pollution), see [3]

Return type:

float, phosphorus pollution for a point in time

SALib.test_functions.linear_model_1 module#

SALib.test_functions.linear_model_1.evaluate(values)[source]#

Linear model (#1) used in Li et al., (2010).

y = x1 + x2 + x3 + x4 + x5

Parameters:

values (np.array)

References

[1]

Genyuan Li, H. Rabitz, P.E. Yelvington, O.O. Oluwole, F. Bacon, C.E. Kolb, and J. Schoendorf, “Global Sensitivity Analysis for Systems with Independent and/or Correlated Inputs”, Journal of Physical Chemistry A, Vol. 114 (19), pp. 6022 - 6032, 2010, https://doi.org/10.1021/jp9096919

SALib.test_functions.linear_model_2 module#

SALib.test_functions.linear_model_2.evaluate(values)[source]#

Linear model (#2) used in Li et al., (2010).

y = 5x1 + 4x2 + 3x3 + 2x4 + x5

Parameters:

values (np.array)

References

[1]

Genyuan Li, H. Rabitz, P.E. Yelvington, O.O. Oluwole, F. Bacon, C.E. Kolb, and J. Schoendorf, “Global Sensitivity Analysis for Systems with Independent and/or Correlated Inputs”, Journal of Physical Chemistry A, Vol. 114 (19), pp. 6022 - 6032, 2010, https://doi.org/10.1021/jp9096919

SALib.test_functions.oakley2004 module#

SALib.test_functions.oakley2004.evaluate(X: ndarray, A: ndarray, M: ndarray) ndarray[source]#

Test function taken from Oakley and O’Hagan (2004) (see Eqn. 21 in [1])

References

[1]

Oakley, J.E., O’Hagan, A., 2004. Probabilistic sensitivity analysis of complex models: a Bayesian approach. Journal of the Royal Statistical Society: Series B (Statistical Methodology) 66, 751–769. https://doi.org/10.1111/j.1467-9868.2004.05304.x

Module contents#