# SALib Release 1.3.8

Tools for sensitivity analysis. Contains Sobol, Morris, and FAST methods

Keywords
global-sensitivity-analysis, joss, morris, numpy, python, salib, sensitivity-analysis, sensitivity-analysis-library, sobol, uncertainty, uncertainty-quantification
MIT
Install
``` pip install SALib==1.3.8 ```

# Sensitivity Analysis Library (SALib)

Python implementations of commonly used sensitivity analysis methods. Useful in systems modeling to calculate the effects of model inputs or exogenous factors on outputs of interest.

Requirements: NumPy, SciPy, matplotlib, pandas, Python 3 (from SALib v1.2 onwards SALib does not officially support Python 2)

Installation: `pip install SALib` or `python setup.py install` or `conda install SALib`

`Herman, J., Usher, W., (2017), SALib: An open-source Python library for Sensitivity Analysis, Journal of Open Source Software, 2(9), 97, doi:10.21105/joss.00097`

Methods included:

Contributing: see here

## Quick Start

```from SALib.sample import saltelli
from SALib.analyze import sobol
from SALib.test_functions import Ishigami
import numpy as np

problem = {
'num_vars': 3,
'names': ['x1', 'x2', 'x3'],
'bounds': [[-np.pi, np.pi]]*3
}

# Generate samples
param_values = saltelli.sample(problem, 1000)

# Run model (example)
Y = Ishigami.evaluate(param_values)

# Perform analysis
Si = sobol.analyze(problem, Y, print_to_console=True)
# Returns a dictionary with keys 'S1', 'S1_conf', 'ST', and 'ST_conf'
# (first and total-order indices with bootstrap confidence intervals)```

It's also possible to specify the parameter bounds in a file with 3 columns:

```# name lower_bound upper_bound
P1 0.0 1.0
P2 0.0 5.0
...etc.
```

Then the `problem` dictionary above can be created from the `read_param_file` function:

```from SALib.util import read_param_file