Generalised Sobol indices
A natural generalization of the Sobol indices (that are classically defined for single-output models) for multi-output models. The generalised Sobol indices are computed using the Pick-and-Freeze approach. (For implementation details, see also [39].)
Consider a model \(Y=f(X): \mathbb{R}^d \rightarrow \mathbb{R}^k\) with \(d\) inputs \(X=\left[ X_{1}, X_{2},…,X_{d} \right]\) and \(k\) outputs \(Y=\left[ Y_{1}, Y_{2},…,Y_{k} \right]\).
As the inputs \(X_{1}, \ldots, X_{d}\) are independent, \(f\) may be decomposed through the so-called Hoeffding decomposition:
where \(c \in \mathbb{R}^{k}, f_{\mathbf{u}}: E_{\mathbf{u}} \rightarrow \mathbb{R}^{k}, f_{\sim \mathbf{u}}: E_{\sim \mathbf{u}} \rightarrow \mathbb{R}^{k}\) and \(f_{\mathbf{u}, \sim \mathbf{u}}: E \rightarrow \mathbb{R}^{k}\) are given by
Thanks to \(L^{2}\)-orthogonality, computing the covariance matrix of both sides of the above equation leads to
Here, \(\Sigma, C_{\mathbf{u}}, C_{\sim \mathbf{u}}\) and \(C_{\mathbf{u}, \sim \mathbf{u}}\) are denoting the covariance matrices of \(Y, f_{\mathbf{u}}\left(X_{\mathbf{u}}\right), f_{\sim \mathbf{u}}\left(X_{\sim \mathbf{u}}\right)\) and \(f_{\mathbf{u}, \sim \mathbf{u}}\left(X_{\mathbf{u}}, X_{\sim \mathbf{u}}\right)\) respectively.
The first order generalised Sobol indices can be computed using the Pick-and-Freeze approach as follows, where \(\mathbf{u}\) is a variable \(i\) of the independent random variables.
where \(C_{\mathbf{i}, N}\) and \(\Sigma_{N}\) are the empirical estimators of \(C_{\mathbf{i}}=\operatorname{Cov}\left(Y, Y^{\mathbf{i}}\right)\) and \(\Sigma=\mathbb{V}[Y]\) defined by
and
Generalised Sobol Class
The GeneralisedSobolSensitivity
class is imported using the following command:
>>> from UQpy.sensitivity.GeneralisedSobolSensitivity import GeneralisedSobolSensitivity
Methods
- class GeneralisedSobolSensitivity(runmodel_object, dist_object, random_state=None, **kwargs)[source]
Compute the generalised Sobol indices for models with multiple outputs (vector-valued response) using the Pick-and-Freeze method.
- Parameters:
runmodel_object – The computational model. It should be of type
RunModel
. The output QoI can be a scalar or vector of lengthny
, then the sensitivity indices of allny
outputs are computed independently.distributions – List of
Distribution
objects corresponding to each random variable, orJointIndependent
object (multivariate RV with independent marginals).random_state – Random seed used to initialize the pseudo-random number generator. Default is
None
.
Methods:
- run(n_samples=1000, n_bootstrap_samples=None, confidence_level=0.95)[source]
Compute the generalised Sobol indices for models with multiple outputs (vector-valued response) using the Pick-and-Freeze method.
- Parameters:
n_samples (
int
) – Number of samples used to compute the sensitivity indices. Default is 1,000.n_bootstrap_samples (
Optional
[int
]) – Number of bootstrap samples used to compute the confidence intervals. Default isNone
.confidence_level (
float
) – Confidence level used to compute the confidence intervals. Default is 0.95.
Attributes
- GeneralisedSobolSensitivity.generalized_first_order_indices
Generalised first order Sobol indices,
numpy.ndarray
of shape (n_variables, 1)
- GeneralisedSobolSensitivity.generalized_total_order_indices
Generalised total order Sobol indices,
numpy.ndarray
of shape (n_variables, 1)