Cramér-von Mises indices

A sensitivity index based on the Cramér-von Mises distance. In contrast to the variance based Sobol indices, it takes into account the whole distribution of the model output and is therefore considered as a moment-free method [38]. Furthermore the index can be naturally extended to multivariate model outputs (not implemented yet in UQPy).

Consider a model \(Y=f(X): \mathbb{R}^d \rightarrow \mathbb{R}^k\) with \(d\) inputs \(X_{(1)}, X_{(2)}, \ldots, X_{(d)}\) and \(k\) outputs \(Y_{(1)}, Y_{(2)}, \ldots, Y_{(k)}\). We define the cumulative distribution function \(F(t)\) of \(Y\) as:

\[F(t)=\mathbb{P}(Z \leqslant t)=\mathbb{E}\left[\mathbb{1}_{\{Z \leqslant t\}}\right] \text { for } t=\left(t_{1}, \ldots, t_{k}\right) \in \mathbb{R}^{k}\]

and the conditional distribution function \(F(t)\) of \(Y\) as:

\[F^{v}(t)=\mathbb{P}\left(Z \leqslant t \mid X_{v}\right)=\mathbb{E}\left[\mathbb{1}_{\{Z \leqslant t\}} \mid X_{v}\right] \text { for } t=\left(t_{1}, \ldots, t_{k}\right) \in \mathbb{R}^{k}\]

where, \(\{Z \leqslant t\} \text { means that } \left\{Z_{1} \leqslant t_{1}, \ldots, Z_{k} \leqslant t_{k}\right\}\).

The first order Cramér-von Mises index \(S_{2, C V M}^{i}\) (for input \(v = {i}\)) is defined as:

\[S_{2, C V M}^{i}:=\frac{\int_{\mathbb{R}^{k}} \mathbb{E}\left[\left(F(t)-F^{i}(t)\right)^{2}\right] d F(t)}{\int_{\mathbb{R}^{k}} F(t)(1-F(t)) d F(t)}\]

and the total Cramér-von Mises index \(S_{2, C V M}^{T o t, i}\) (for input \(v = {i}\)) is defined as:

\[S_{2, C V M}^{T o t, i}:=1-S_{2, C V M}^{\sim i}=1-\frac{\int_{\mathbb{R}^{k}} \mathbb{E}\left[\left(F(t)-F^{\sim i}(t)\right)^{2}\right] d F(t)}{\int_{\mathbb{R}^{k}} F(t)(1-F(t)) d F(t)}\]

The above first and total order indices are estimated using the Pick-and-Freeze approach. This requires \(N(d+2)\) model evaluations, where \(N\) is the number of samples. (For implementation details, see also [37].)

Cramér-von Mises Class

The CramerVonMisesSensitivity class is imported using the following command:

>>> from UQpy.sensitivity.CramerVonMisesSensitivity import CramerVonMisesSensitivity

Methods

class CramerVonMisesSensitivity(runmodel_object, dist_object, random_state=None)[source]

Compute the Cramér-von Mises indices.

Currently only available for models with scalar output.

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, estimate_sobol_indices=False, num_bootstrap_samples=None, confidence_level=0.95, disable_CVM_indices=False)[source]

Compute the Cramér-von Mises indices.

Parameters:
  • n_samples (int) – Number of samples used to compute the Cramér-von Mises indices. Default is 1,000.

  • estimate_sobol_indices (bool) – If True, the Sobol indices are estimated using the pick-and-freeze samples.

  • num_bootstrap_samples (Optional[int]) – Number of bootstrap samples used to estimate the Sobol indices. Default is None.

  • confidence_level (float) – Confidence level used to compute the confidence intervals of the Cramér-von Mises indices.

  • disable_CVM_indices (bool) – If True, the Cramér-von Mises indices are not computed.

Attributes

CramerVonMisesSensitivity.first_order_CramerVonMises_indices

First order Cramér-von Mises indices, numpy.ndarray of shape (n_variables, 1)

CramerVonMisesSensitivity.confidence_interval_CramerVonMises

Confidence intervals of the first order Cramér-von Mises indices, numpy.ndarray of shape (n_variables, 2)

CramerVonMisesSensitivity.first_order_sobol_indices

First order Sobol indices computed using the pick-and-freeze samples, numpy.ndarray of shape (n_variables, 1)

CramerVonMisesSensitivity.total_order_sobol_indices

Total order Sobol indices computed using the pick-and-freeze samples, numpy.ndarray of shape (n_variables, 1)

CramerVonMisesSensitivity.n_samples

Number of samples used to compute the Cramér-von Mises indices, int

CramerVonMisesSensitivity.n_variables

Number of input random variables, int

Examples