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:

\[f(X) = c + f_{\mathbf{u}}\left(X_{\mathbf{u}}\right)+f_{\sim \mathbf{u}}\left(X_{\sim \mathbf{u}}\right) + f_{\mathbf{u}, \sim \mathbf{u}}\left(X_{\mathbf{u}}, X_{\sim \mathbf{u}}\right)\]

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

\[c = \mathbb{E}(Y),\]
\[f_{\mathbf{u}}=\mathbb{E}\left(Y \mid X_{\mathbf{u}}\right)-c,\]
\[f_{\sim \mathbf{u}}=\mathbb{E}\left(Y \mid X_{\sim \mathbf{u}}\right)-c,\]
\[f_{u, \sim \mathbf{u}}=Y-f_{\mathbf{u}}-f_{\sim \mathbf{u}}-c.\]

Thanks to \(L^{2}\)-orthogonality, computing the covariance matrix of both sides of the above equation leads to

\[\Sigma = C_{\mathbf{u}}+C_{\sim \mathbf{u}}+C_{\mathbf{u}, \sim \mathbf{u}}.\]

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.

\[S_{i, N}=\frac{\operatorname{Tr}\left(C_{i, N}\right)}{\operatorname{Tr}\left(\Sigma_{N}\right)}\]

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

\[C_{\mathbf{i}, N}=\frac{1}{N} \sum_{j=1}^{N} Y_{j}^{\mathrm{i}} Y_{j}^{t}-\left(\frac{1}{N} \sum_{j=1}^{N} \frac{Y_{j}+Y_{j}^{\mathbf{i}}}{2}\right)\left(\frac{1}{N} \sum_{j=1}^{N} \frac{Y_{j}+Y_{j}^{\mathbf{i}}}{2}\right)^{t}\]

and

\[\Sigma_{N}=\frac{1}{N} \sum_{j=1}^{N} \frac{Y_{j} Y_{j}^{t}+Y_{j}^{\mathbf{i}}\left(Y_{j}^{\mathbf{i}}\right)^{t}}{2}-\left(\frac{1}{N} \sum_{j=1}^{N} \frac{Y_{j}+Y_{j}^{\mathbf{i}}}{2}\right)\left(\frac{1}{N} \sum_{j=1}^{N} \frac{Y_{j}+Y_{j}^{\mathbf{i}}}{2}\right)^{t}\]

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 length ny, then the sensitivity indices of all ny outputs are computed independently.

  • distributions – List of Distribution objects corresponding to each random variable, or JointIndependent 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 is None.

  • 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)

GeneralisedSobolSensitivity.n_samples

Number of samples used to compute the sensitivity indices, int

GeneralisedSobolSensitivity.n_variables

Number of model input variables, int

Examples