Skip to content
Sensitivity Analysis Library in Python (Numpy). Contains Sobol, Morris, Fractional Factorial and FAST methods.
Branch: master
Clone or download
willu47 Merge pull request #239 from ConnectedSystems/rbd-fast-arg-order
- Changed parameter args to conform with expected order
- Many thanks @ConnectedSystems and @j-chacon for this.
Latest commit 0a36d0e Apr 30, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs Migrated to pyscaffold 3 Feb 28, 2019
examples Changed parameter args to conform with expected order Apr 29, 2019
paper Added authors to metadata file Oct 18, 2016
src/SALib Updated tests and docstring with expected order for rbd-fast Apr 29, 2019
tests Updated tests and docstring with expected order for rbd-fast Apr 29, 2019
.checkignore Ignore tests in QC Oct 9, 2016
.coveragerc Migrated to pyscaffold 3 Feb 28, 2019
.coveralls.yml Added pyscaffold to replace versioneer Oct 9, 2016
.gitattributes Added auto-version numbering to repository Nov 28, 2014
.gitignore Migrated to pyscaffold 3 Feb 28, 2019
.pre-commit-config.yaml Added docstrings and linted Jun 13, 2017
.travis.yml Travis: 3.8-dev does not exist in conda Apr 23, 2019
AUTHORS.rst Added authors and changelogs to documentation Oct 26, 2016
CHANGELOG.rst Migrated to pyscaffold 3 Feb 28, 2019
CITATIONS.rst Fixed syntax for link Aug 22, 2017
CODE_OF_CONDUCT.md Added e-mail to code of conduct Jun 15, 2017
CONTRIBUTING.md Added development notes Nov 16, 2018
LICENSE.txt Migrated to pyscaffold 3 Feb 28, 2019
README-advanced.md Migrated to pyscaffold 3 Feb 28, 2019
README.rst Added pandas to readme Mar 4, 2019
requirements.txt Migrated to pyscaffold 3 Feb 28, 2019
setup.cfg Fixed illegal license Mar 14, 2019
setup.py Migrated to pyscaffold 3 Feb 28, 2019
test-requirements.txt Removed nose dependency from tests, replaced with pytest - fix #212 Mar 14, 2019

README.rst

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, 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

Build Status: Build Status Test Coverage: Coverage Status

SALib Paper: status

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
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.

License

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

You can’t perform that action at this time.