Skip to main content

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.

Download files

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

Source Distribution

SALib-1.3.3.tar.gz (749.9 kB view details)

Uploaded Source

File details

Details for the file SALib-1.3.3.tar.gz.

File metadata

  • Download URL: SALib-1.3.3.tar.gz
  • Upload date:
  • Size: 749.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.8

File hashes

Hashes for SALib-1.3.3.tar.gz
Algorithm Hash digest
SHA256 a3c6b1e74552bdb43ee1af7ee4c7d348e0723161159eac8c72803c8b6fd9acc9
MD5 0aa6ba692fef489a46dd3cdb9a4f6df0
BLAKE2b-256 e7dae7b47afcbce8a234379872e0563381d55f3d9893343401cc4f9a564241a5

See more details on using hashes here.

Release history Release notifications | RSS feed

1.5.2

2 files

1.5.1

2 files

1.5.0

2 files

1.4.8

2 files

1.4.7

2 files

1.4.6.1

2 files

1.4.6

2 files

1.4.5

2 files

1.4.4

2 files

1.4.1

2 files

1.4.0.2

1 file

1.4.0.1

1 file

1.4.0

1 file

1.3.13

1 file

1.3.12

1 file

1.3.11

1 file

1.3.8

1 file

1.3.7

1 file

1.3.6

1 file

1.3.5

1 file

1.3.4

1 file

This release

1.3.3 This release

1 file

1.2

1 file

1.1.3

1 file

1.1.2

1 file

1.1.0

1 file

1.0.3

1 file

1.0.2

1 file

1.0.1

1 file

0.7.1

1 file

0.7

1 file

0.6.3

1 file

0.6.2

1 file

0.6

1 file

0.5

1 file

0.4

1 file

0.3

1 file

0.2

1 file

0.1

1 file

0.0.0

2 files

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