RSA Method

GlobalSensitivity.RSA — Type
RSA(; n_dummy_parameters::Int = 10, acceptance_threshold::Union{Function, Real} = mean)

Keywords

  • n_dummy_parameters::Int = 10: number of dummy parameters used for sensitivity hypothesis tests and sample-size checks.
  • acceptance_threshold::Union{Function, Real} = mean: acceptance threshold or a function f(Y)::Real that calculates one from sensitivity outputs.

Method Details

The RSA (Regional Sensitivity Analysis) method[1] is a monte-carlo based technique for performing nonparametric global sensitivity analysis. The method is based on the Kolmogorov-Smirnov (KS) test, which is a nonparametric test of the equality of continuous, one-dimensional probability distributions. Each result of a monte-carlo simulation is either classified as behavior ($\bar{B}$). For each parameter $i$, the cumulative distributions of the behavior and non-behavior outputs are determined as $F_{i}$ and $\bar{F}_{i}$, respectively. The sensitivity for each parameter $i$ is then given by:

\[S_{i} = \sup_{j} |F_{i,j} - (1 - F_{i,j})|\]

where $F_{i,j}$ is sample $j$ of the cumulative distribution of the sensitivity output for parameter $i$.

Dummy parameters are added to the model to check the amount of samples and to perform sensitivity hypothesis testing. Note that because of random sampling the results may vary between runs.

API

gsa(f, method::RSA, p_range; samples, batch = false)

Returns a RSAResult object containing the sensitivity indices for the parameters as S, and mean and standard deviation of the dummy parameters as a tuple Sd = (<mean>, <std>).

Example

using GlobalSensitivity

function ishi_batch(X)
    A= 7
    B= 0.1
    @. sin(X[1,:]) + A*sin(X[2,:])^2+ B*X[3,:]^4 *sin(X[1,:])
end
function ishi(X)
    A= 7
    B= 0.1
    sin(X[1]) + A*sin(X[2])^2+ B*X[3]^4 *sin(X[1])
end

lb = -ones(4)*π
ub = ones(4)*π

res1 = gsa(ishi,RSA(),[[lb[i],ub[i]] for i in 1:4],samples=15000)
res2 = gsa(ishi_batch,RSA(),[[lb[i],ub[i]] for i in 1:4],samples=15000,batch=true)

References

source
  • 1Hornberger, G.M. & Spear, Robert. (1981). An Approach to the Preliminary Analysis of Environmental Systems. J. Environ. Manage.; (United States). 12:1.