Global Sensitivity Analysis (GSA) methods are used to quantify the uncertainty in output of a model with respect to the parameters. These methods allow practitioners to measure both parameter's individual contributions and the contribution of their interactions to the output uncertainity.
To use this functionality, you must install GlobalSensitivity.jl:
]add GlobalSensitivity using GlobalSensitivity
Note: GlobalSensitivity.jl is unrelated to the GlobalSensitivityAnalysis.jl package.
The general interface for performing global sensitivity analysis using this package is:
gsa(f, method::GSAMethod, param_range; samples, batch=false)
y=f(x)is a function that takes in a single vector and spits out a single vector or scalar. If
ftakes in a matrix where each row is a set of parameters, and returns a matrix where each row is a the output for the corresponding row of parameters.
methodis one of the available GSA methods.
param_rangeis a vector of tuples for the upper and lower bound for the given parameter
samplesis a required keyword argument for the number of samples of parameters for the design matrix. Note that this is not relevant for Fractional Factorial Method and Morris Method.
res = gsa(X, Y, method)
Xis the number of parameters * samples matrix with parameter values.
Yis the output dimension * number of samples matrix with out evaluated at
methodis one of the GSA methods below.
For Sobol Method one can use the following design matrices based method instead of parameter range based method discussed earlier:
effects = gsa(f, method, A, B; batch=false)
B are design matrices with each row being a set of parameters. Note that
generate_design_matrices from QuasiMonteCarlo.jl can be used to generate the design matrices.
The descriptions of the available methods can be found in the Methods section. The
gsa interface allows for utilizing batched functions with the
batch kwarg discussed above for parallel computation of GSA results.