Skip to main content

Estimation of Shapley effects for Sensitivity Analysis of Model Output.

Project description

[![build status](]( [![coverage report](]( # Shapley effects

Shapley-effects, or shapley, is a Python library that estimates the Shapley effects for the field of Sensitivity Analysis of Model Output [[1]]( Several features are available in the library. For a given probabilistic model and numerical function, it is possible to:

  • compute the Shapley effects,

  • compute the Sobol’ indices for dependent and independent inputs,

  • build a surrogate model to substitute the numerical function.

The library is mainly built on top of NumPy, OpenTURNS and other libraries. It is also validated and compared to the [sensitivity]( package from the R software.

## Important links

## Installation

Various dependencies are necessary in this library and we strongly recommend the use of [Anaconda]( for the installation. The dependencies are:

  • Numpy,

  • Scipy,

  • Pandas,

  • OpenTURNS,

  • Scikit-Learn,

  • GPflow.

Scikit-learn is used to build kriging and random-forest models. OpenTURNS is a very convenient tool to define probabilistic distributions. GPflow which generates kriging models from GPy using Tensorflow.

Optional dependencies are also necessary for various task like plotting or tuning the model:

  • Matplotlib,

  • Seaborn,

  • Scikit-Optimize.

These libraries can easily be installed using Anaconda and pip. Execute the following commands:

` conda install numpy pandas scikit-learn tensorflow matplotlib seaborn scikit-optimize conda install -c conda-forge openturns gpy `

The package GPflow is not available on Anaconda or PyPi. Thus it must be installed from the source. First clone the GitHub repository:

` git clone `

Then, inside the GPflow folder, execute the command:

` pip install . `

## Acknowledgements

The library has been developed at the [CEMRACS 2017]( with the help of Bertrand Iooss, Roman Sueur, Veronique Maume-Deschamps and Clementine Prieur.

## References

[1] Owen, A. B., & Prieur, C. (2017). On Shapley value for measuring importance of dependent inputs. SIAM/ASA Journal on Uncertainty Quantification, 5(1), 986-1002.

[2] Song, E., Nelson, B. L., & Staum, J. (2016). Shapley effects for global sensitivity analysis: Theory and computation. SIAM/ASA Journal on Uncertainty Quantification, 4(1), 1060-1083.

Project details

Release history Release notifications | RSS feed

This version


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

shapley-effects-0.1.tar.gz (22.0 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page