Provide different methods of estimating Sobol indices
The Subglobal sensitivity analysis (SA) is a global SA around a subspace of the entire parameter space. One kind of global SA is the computation of Sobol indices and there are many methods of computing these (see e.g. help of the sensitivity
R package ).
In order to combine Subglobal SA with different methods of estimation of Sobol indices, there is interface SobolSensitivityEstimator
, which can be implemented to support other methods.
The first method, generate_design_matrix
, creates a design matrix (nrec × npar) with parameter vectors in rows.
The second method, estimate_sobol_indices
, takes a vector of computed results for each of the design matrix parameters, and computes first and total Sobol indices.
Index
SubglobalSensitivityAnalysis.SensitivityEstimator
SubglobalSensitivityAnalysis.SobolSensitivityEstimator
SubglobalSensitivityAnalysis.SobolTouati
SubglobalSensitivityAnalysis.estimate_sobol_indices
SubglobalSensitivityAnalysis.generate_design_matrix
SubglobalSensitivityAnalysis.get_design_matrix
SubglobalSensitivityAnalysis.reload_design_matrix
SubglobalSensitivityAnalysis.supports_reloading
Types
SubglobalSensitivityAnalysis.SensitivityEstimator
— TypeAbstract supertype of Sensitivity Estimators
SubglobalSensitivityAnalysis.SobolSensitivityEstimator
— TypeAbstract supertype of Sensitivity Estimators returning Sobol indices.
Subtypes need to implement the following functions:
If it implements trait , then it need also implement
SubglobalSensitivityAnalysis.generate_design_matrix
— Functiongenerate_design_matrix(estim::SobolSensitivityEstimator, X1, X2)
Generate the design matrix based on the two samples of parameters, where each row is a parameter sample. For return value see get_design_matrix
.
If the subtype supports_reloading(subtype) != SupportsReloadingNo()
, then after this a call to generate_design_matrix
it should be able to recreate its state using method reload_design_matrix
.
SubglobalSensitivityAnalysis.get_design_matrix
— Functionget_design_matrix(estim)
Return the design matrix: a matrix with parameters in rows, for which to compute the output, whose sensitivity is studied.
SubglobalSensitivityAnalysis.estimate_sobol_indices
— Functionestimate_sobol_indices(rest::RSobolEstimator, y, par_names=missing)
Estimate the Sobol sensitivity indices for the given result, y
, for each row of the design matrix.
Value
A DataFrame with columns
par
: parameter nameindex
: which one of the SOBOL-indices,:first_order
or:total
value
: the estimatecf_lower
andcf_upper
: estimates of the confidence interval. The meaning, i.e. with of the interval is usually parameterized when creating the sensitivity estimator object (see e.g.SobolTouati
).
supports_reloading trait
Reference for the concept explained at How to reload the design matrix.
SubglobalSensitivityAnalysis.supports_reloading
— FunctionTrait that indicates that object can be called with method reload_design_matrix
.
Implement this trait by supports_reloading(subtype) = SupportsReloadingYes()
SubglobalSensitivityAnalysis.reload_design_matrix
— Functionreload_design_matrix(::SupportsReloadingYes, estim::SobolSensitivityEstimator)
Reload the design matrix, i.e. recreate the state after last call to generate_design_matrix
. Called with trait type returned by supports_reloading
.
Sobol estimation methods
SubglobalSensitivityAnalysis.SobolTouati
— TypeSobolTouati(;conf = 0.95, rest = RSobolEstimator("sens_touati", nothing))
Concrete type of SobolSensitivityEstimator
, based on method soboltouati
from the sensitivityR package . It computes both first-order and total indices using correlation coefficients-based formulas, at a total cost of $n(p+2)×n$ model evaluations. It also computes their confidence intervals based on asymptotic properties of empirical correlation coefficients.
Arguments
conf
: range of the confidence interval around Sobol indices to be estimatedrest=RSobolEstimator(varname, filename)
: Can adjust R variable name of the sensitivity object, and the filename of the backupof this object. By providing a filename, the estimator can be recreated, after needing to restart the R session (see How to reload the design matrix).