Sensitivity Analysis Library in Python (Numpy). Contains Sobol, Morris, Fractional Factorial and FAST methods.
Clone or download
Latest commit ccd7b0a Oct 31, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
SALib Consistent index style for DataFrames of results Oct 27, 2018
docs update doc for RBD-FAST Jan 17, 2018
examples working problem definition Oct 27, 2018
paper Added authors to metadata file Oct 18, 2016
tests Check index contents are the same rather than content and order Oct 27, 2018
.checkignore Ignore tests in QC Oct 9, 2016
.coveragerc Amended coverage configuration Oct 9, 2016
.coveralls.yml Added pyscaffold to replace versioneer Oct 9, 2016
.gitattributes Added auto-version numbering to repository Nov 28, 2014
.gitignore Created strategies for morris optimal samples Jun 13, 2017
.pre-commit-config.yaml Added docstrings and linted Jun 13, 2017
.travis.yml Removed postgres service from travis config Jun 25, 2017
AUTHORS.rst Added authors and changelogs to documentation Oct 26, 2016
CHANGES.rst Added report for version 1.1.0 Aug 29, 2017
CITATIONS.rst Fixed syntax for link Aug 22, 2017 Added e-mail to code of conduct Jun 15, 2017 Removed random standard library as use is inconsistent over python 2 … Jun 20, 2017 bump years on readme and license Jan 7, 2017 update advanced readme to include groups Sep 19, 2017 small readme updates Jan 24, 2018
requirements.txt Subclass of dict to hold analysis results and added dependencies Oct 22, 2018
setup.cfg classifier singular, tested with python --classifiers, no id… Oct 9, 2017 Replaced versioneer with pyscaffold, updated docs Oct 9, 2016
test-requirements.txt Moved fixtures into and migrated to pytest from nose Jun 14, 2017

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.

Documentation: ReadTheDocs

Requirements: NumPy, SciPy, matplotlib

Installation: pip install SALib or python install

Build Status: Build Status Test Coverage: Coverage Status

Code Issues: Code Issues

SALib Paper: status

Herman, J. and Usher, W. (2017) SALib: An open-source Python library for sensitivity analysis. 
Journal of Open Source Software, 2(9).

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

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

from SALib.util import read_param_file
problem = read_param_file('/path/to/file.txt')
# ... same as above

Lots of other options are included for parameter files, as well as a command-line interface. See the advanced readme.

Also check out the examples for a full description of options for each method.


Copyright (C) 2018 Jon Herman, Will Usher, and others. Versions v0.5 and later are released under the MIT license.