Skip to main content

A Python implementation of the SAFE toolbox for sensitivity analysis

Project description

SAFEpython

Python version of the Sensitivity Analysis for Everybody (SAFE) Toolbox.

License: GPL-3.0

BEFORE STARTING

An introduction to the SAFE Toolbox is provided in the paper:

Pianosi, F., Sarrazin, F., Wagener, T. (2015), A Matlab toolbox for Global Sensitivity Analysis, Environmental Modelling & Software, 70, 80-85. The paper is freely available at: https://doi.org/10.1016/j.envsoft.2015.04.009

We recommend reading this (short) paper before getting started. Other reading materials, including general introductions to Sensitivity Analysis and case study applications, can be found at: https://safetoolbox.github.io

INSTALLING THE PACKAGE

Option 1: Installing the package using pip

pip install safepython

Option 2: Installing a local version of the package (if you want to customize the code)

Download the SAFEpython source code to your computer. You go into the SAFE-Python folder and execute:

pip install .

Notes

  • You can execute the previous commands from python command line (e.g. Anaconda prompt).

  • From command line, you should use:

option 1: python -m pip install safepython

option 2: python -m pip install .

  • For windows users: python cannot be called directly from Windows command line. You have to go into the folder in which python is installed and then execute:

option 1: python -m pip install safepython

option 2: python -m pip install mydir\SAFE-python

(mydir is the directory in which the SAFEpython folder is saved, and it shoud not contain which spaces)

  • If you want to install the package without administrator rights, you may have to use:

pip install --user .

GETTING STARTED

To get started using SAFE, we suggest opening one of the workflow scripts in the 'examples' folder available in the github repository and running the code step by step. The header of each workflow script gives a short description of the method and case study model, and of the main steps and purposes of that workflow, as well as references for further reading. The name of each workflow is composed as: workflow_method_model

Implemented models are:

  • the hydrological Hymod model
  • the hydrological HBV model
  • the Ishigami and Homma test function
  • the Sobol' g-function

Implemented methods are:

  • eet (elementary effects test, or method of Morris)
  • fast (Fourier amplitude sensitivity test)
  • pawn
  • rsa (regional sensitivity analysis)
  • vbsa (variance-based sensitivity analysis, or method of Sobol')

Furthermore, SAFE includes additional workflow scripts:

  • external: how to connect SAFE to a model running outside python
  • tvsa: how to apply GSA methods to perform time-varying sensitivity analysis
  • visual: how to use visualisation functions for qualitative GSA

If the user still has no clear idea of what method(s) to start with, we suggest one of the three most widely used methods: eet (e.g. workflow_eet_hymod), rsa (workflow_rsa_hymod), vbsa (workflow_vbsa_hymod) or the visualization workflow (workflow_visual_ishigami_homma.m).

Note

Please make sure that you download the version of the 'examples' folder that corresponds to the version of SAFEpython package you are using. To use the latest version of SAFEpython, you can update the package using:

pip install --upgrade safepython

HOW TO CITE SAFEPYTHON

If you would like to use the software, please cite it using the following:

Pianosi, F., Sarrazin, F., Wagener, T. (2015), A Matlab toolbox for Global Sensitivity Analysis, Environmental Modelling & Software, 70, 80-85, doi: 10.1016/j.envsoft.2015.04.009.

DOI

Project details


Download files

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

Source Distribution

safepython-0.2.0.tar.gz (63.7 kB view details)

Uploaded Source

Built Distribution

safepython-0.2.0-py3-none-any.whl (78.2 kB view details)

Uploaded Python 3

File details

Details for the file safepython-0.2.0.tar.gz.

File metadata

  • Download URL: safepython-0.2.0.tar.gz
  • Upload date:
  • Size: 63.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.4 Windows/11

File hashes

Hashes for safepython-0.2.0.tar.gz
Algorithm Hash digest
SHA256 84c2ecf8d90f930a5868fff0e6afe07520328fbc1ba5851a5167f7c8acaf37ba
MD5 988f0098668effb7cee39d869f5e24ce
BLAKE2b-256 905848a50e28b27069363d14b37ca7b845b76551f5664af4196140fe4b6485d9

See more details on using hashes here.

File details

Details for the file safepython-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: safepython-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 78.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.4 Windows/11

File hashes

Hashes for safepython-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 74902af0e5bead33639d0b3c692e0884518aeaf05838f17959b10117d123f88d
MD5 aacdf0bddc8846365530a2dc6b32bf5f
BLAKE2b-256 6a76770bffadff4e68d71e0cc7dc8c22b01578eaeec190cca2726d7ed1bc323b

See more details on using hashes here.

Supported by

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