Skip to main content

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

Release files for SAFEpython 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for SAFEpython 0.2.0
File Size Uploaded
safepython-0.2.0.tar.gz 63.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for SAFEpython 0.2.0
File Interpreter ABI Platform
safepython-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 141.8 kB

Release files / safepython-0.2.0.tar.gz

Download URL safepython-0.2.0.tar.gz
Size 63.7 kB
Tags Source
SHA-256 checksum
How to use checksums
84c2ecf8d90f930a5868fff0e6afe07520328fbc1ba5851a5167f7c8acaf37ba
BLAKE2b-256 checksum
How to use checksums
905848a50e28b27069363d14b37ca7b845b76551f5664af4196140fe4b6485d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.12.4 Windows/11

Release files / safepython-0.2.0-py3-none-any.whl

Download URL safepython-0.2.0-py3-none-any.whl
Size 78.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
74902af0e5bead33639d0b3c692e0884518aeaf05838f17959b10117d123f88d
BLAKE2b-256 checksum
How to use checksums
6a76770bffadff4e68d71e0cc7dc8c22b01578eaeec190cca2726d7ed1bc323b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.12.4 Windows/11
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page