Skip to content

Commit

Permalink
Added documentation Chatterjee sensitivity
Browse files Browse the repository at this point in the history
  • Loading branch information
Prateek Bhustali committed May 8, 2022
1 parent c86aea2 commit 0b5a666
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/code/sensitivity/chatterjee/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Chatterjee indices
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
These examples serve as a guide for using the Chatterjee sensitivity module. They have been taken from various papers to enable validation of the implementation and have been referenced accordingly.

1. Ishigami function

2. Exponential function

For the Exponential model, analytical Cramer-von Mises indices are available, since they are equivalent to the Chatterjee indices, they are shown here.

3. Sobol function

This example was considered in [1] page 18.

.. [1] Fabrice Gamboa, Pierre Gremaud, Thierry Klein, and Agnès Lagnoux. (2020). Global Sensitivity Analysis: a new generation of mighty estimators based on rank statistics.
2 changes: 2 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
"../code/sensitivity/morris",
"../code/sensitivity/sobol",
"../code/sensitivity/cramer_von_mises",
"../code/sensitivity/chatterjee",
"../code/stochastic_processes/bispectral",
"../code/stochastic_processes/karhunen_loeve",
"../code/stochastic_processes/spectral",
Expand Down Expand Up @@ -129,6 +130,7 @@
"auto_examples/sensitivity/morris",
"auto_examples/sensitivity/sobol",
"auto_examples/sensitivity/cramer_von_mises",
"auto_examples/sensitivity/chatterjee",
"auto_examples/stochastic_processes/bispectral",
"auto_examples/stochastic_processes/karhunen_loeve",
"auto_examples/stochastic_processes/spectral",
Expand Down
41 changes: 41 additions & 0 deletions docs/source/sensitivity/chatterjee.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
Chatterjee indices
----------------------------------------

The Chatterjee index measures the strength of the relationship between :math:`X` and :math:`Y` using rank statistics.

Consider :math:`n` samples of random variables :math:`X` and :math:`Y`, with :math:`(X_{(1)}, Y_{(1)}), \ldots,(X_{(n)}, Y_{(n)})` such that :math:`X_{(1)} \leq \cdots \leq X_{(n)}`. Here, random variable :math:`X` can be one of the inputs of a model and :math:`Y` be the model response. If :math:`X_{i}`'s have no ties, there is a unique way of doing this (case of ties is also taken into account in the implementation, see [1]_). Let :math:`r_{i}`` be the rank of :math:`Y_{(i)}`, that is, the number of :math:`j` such that :math:`Y_{(j)} \leq Y_{(i)}`.The Chatterjee index :math:`\xi_{n}(X, Y)` is defined as:

.. math::
\xi_{n}(X, Y):=1-\frac{3 \sum_{i=1}^{n-1}\left|r_{i+1}-r_{i}\right|}{n^{2}-1}
The Chatterjee index converges for :math:`n \rightarrow \infty` to the Cramér-von Mises index and is faster to estimate than using the Pick and Freeze approach in the Cramer-von Mises index.

.. [1] Sourav Chatterjee (2021) A New Coefficient of Correlation, Journal of the American Statistical Association, 116:536, 2009-2022, DOI: 10.1080/01621459.2020.1758115 (`Link <https://doi.org/10.1080/01621459.2020.1758115>`_)
Chatterjee Class
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

The :class:`Chatterjee` class is imported using the following command:

>>> from UQpy.sensitivity.chatterjee import Chatterjee

Methods
"""""""
.. autoclass:: UQpy.sensitivity.Chatterjee
:members: run, compute_chatterjee_indices, rank_analog_to_pickfreeze, compute_Sobol_indices

Attributes
""""""""""
.. autoattribute:: UQpy.sensitivity.Chatterjee.chatterjee_i
.. autoattribute:: UQpy.sensitivity.Chatterjee.sobol_i
.. autoattribute:: UQpy.sensitivity.Chatterjee.CI_chatterjee_i
.. autoattribute:: UQpy.sensitivity.Chatterjee.num_vars
.. autoattribute:: UQpy.sensitivity.Chatterjee.n_samples

Examples
""""""""""

.. toctree::

Chatterjee Examples <../auto_examples/sensitivity/chatterjee/index>
2 changes: 2 additions & 0 deletions docs/source/sensitivity/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ This module contains functionality for all the sampling methods supported in :py

The module currently contains the following classes:

- :py:class:`.CramervonMises`: Class to compute Chatterjee sensitivity indices.
- :py:class:`.CramervonMises`: Class to compute Cramér-von Mises sensitivity indices.
- :py:class:`.MorrisSensitivity`: Class to perform Morris.
- :py:class:`.PceSensitivity`: Class to compute the sensitivity indices using the :class:`.PolynomialChaosExpansion` method.
Expand All @@ -18,6 +19,7 @@ Sensitivity analysis comprises techniques focused on determining how the variati
:hidden:
:caption: Sensitivity

Chatterjee <chatterjee>
Cramér-von Mises Sensitivity <cramer_von_mises>
Morris Sensitivity <morris>
Polynomial Chaos Sensitivity <pce>
Expand Down

0 comments on commit 0b5a666

Please sign in to comment.