Skip to content

Commit

Permalink
Merge pull request #223 from willu47/update_pyscaffold
Browse files Browse the repository at this point in the history
Update pyscaffold to version 3
  • Loading branch information
willu47 committed Mar 4, 2019
2 parents 5deeaf3 + d31f84b commit 53ce281
Show file tree
Hide file tree
Showing 83 changed files with 489 additions and 390 deletions.
2 changes: 1 addition & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# .coveragerc to control coverage.py
[run]
branch = True
source = SALib
source = src/SALib/*
omit = tests/*

[report]
Expand Down
8 changes: 1 addition & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
__pycache__/*
.cache/*
.*.swp
*/.ipynb_checkpoints/*

# Project files
.ropeproject
Expand Down Expand Up @@ -39,10 +40,3 @@ docs/api/*
docs/_build/*
cover/*
MANIFEST

# System files
.DS_Store
*.lp
.vscode
.tex*
*.ipynb
9 changes: 7 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@ virtualenv:
system_site_packages: true
env:
matrix:
- DISTRIB="conda" PYTHON_VERSION="2.7" COVERAGE="true"
- DISTRIB="conda" PYTHON_VERSION="3.5" COVERAGE="false"
- DISTRIB="conda" PYTHON_VERSION="3.5" COVERAGE="true"
- DISTRIB="conda" PYTHON_VERSION="3.6" COVERAGE="false"
- DISTRIB="conda" PYTHON_VERSION="3.7" COVERAGE="false"

matrix:
allow_failures:
- env: DISTRIB="conda" PYTHON_VERSION="3.7" COVERAGE="false"
addons:
apt:
packages:
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions README-advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Parameter files can also be comma-delimited if your parameter names or group nam
```
salib sample saltelli \
-n 1000 \
-p ./SALib/test_functions/params/Ishigami.txt \
-p ./src/SALib/test_functions/params/Ishigami.txt \
-o model_input.txt
```

Expand All @@ -27,7 +27,7 @@ salib sample saltelli \
**Run the analysis**
```
salib analyze sobol \
-p ./SALib/test_functions/params/Ishigami.txt \
-p ./src/SALib/test_functions/params/Ishigami.txt \
-Y model_output.txt \
-c 0
```
Expand Down
78 changes: 0 additions & 78 deletions README.md

This file was deleted.

120 changes: 120 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
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 <http://salib.readthedocs.org>`__

**Requirements:** `NumPy <http://www.numpy.org/>`__,
`SciPy <http://www.scipy.org/>`__,
`matplotlib <http://matplotlib.org/>`__,
`pandas <http://https://pandas.pydata.org/>`__,
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:**

* Sobol Sensitivity Analysis (`Sobol 2001 <http://www.sciencedirect.com/science/article/pii/S0378475400002706>`__,
`Saltelli 2002 <http://www.sciencedirect.com/science/article/pii/S0010465502002801>`__,
`Saltelli et al. 2010 <http://www.sciencedirect.com/science/article/pii/S0010465509003087>`__)

* Method of Morris, including groups and optimal trajectories (`Morris
1991 <http://www.tandfonline.com/doi/abs/10.1080/00401706.1991.10484804>`__,
`Campolongo et al. 2007 <http://www.sciencedirect.com/science/article/pii/S1364815206002805>`__)

* Fourier Amplitude Sensitivity Test (FAST) (`Cukier et al. 1973 <http://scitation.aip.org/content/aip/journal/jcp/59/8/10.1063/1.1680571>`__,
`Saltelli et al. 1999 <http://amstat.tandfonline.com/doi/abs/10.1080/00401706.1999.10485594>`__)

* Random Balance Designs - Fourier Amplitude Sensitivity Test (RBD-FAST) (`Tarantola et al. 2006 <https://hal.archives-ouvertes.fr/hal-01065897/file/Tarantola06RESS_HAL.pdf>`__,
`Plischke 2010 <https://doi.org/10.1016/j.ress.2009.11.005>`__,
`Tissot et al. 2012 <https://doi.org/10.1016/j.ress.2012.06.010>`__)

* Delta
Moment-Independent Measure (`Borgonovo 2007 <http://www.sciencedirect.com/science/article/pii/S0951832006000883>`__,
`Plischke et al. 2013 <http://www.sciencedirect.com/science/article/pii/S0377221712008995>`__)

* Derivative-based Global Sensitivity Measure (DGSM) (`Sobol and
Kucherenko 2009 <http://www.sciencedirect.com/science/article/pii/S0378475409000354>`__)

* Fractional Factorial Sensitivity Analysis
(`Saltelli et al. 2008 <http://www.wiley.com/WileyCDA/WileyTitle/productCd-0470059974.html>`__)

**Contributing:** see `here <CONTRIBUTING.md>`__

Quick Start
~~~~~~~~~~~

.. code:: python
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:

.. code:: python
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 <README-advanced.md>`__.

Also check out the
`examples <https://github.com/SALib/SALib/tree/master/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 <LICENSE.md>`__.

.. |Build Status| image:: https://travis-ci.org/SALib/SALib.svg?branch=master
:target: https://travis-ci.org/SALib/SALib
.. |Coverage Status| image:: https://img.shields.io/coveralls/SALib/SALib.svg
:target: https://coveralls.io/r/SALib/SALib
.. |Code Issues| image:: https://www.quantifiedcode.com/api/v1/project/ed62e70f899e4ec8af4ea6b2212d4b30/badge.svg
:target: https://www.quantifiedcode.com/app/project/ed62e70f899e4ec8af4ea6b2212d4b30
.. |status| image:: http://joss.theoj.org/papers/431262803744581c1d4b6a95892d3343/status.svg
:target: http://joss.theoj.org/papers/431262803744581c1d4b6a95892d3343

0 comments on commit 53ce281

Please sign in to comment.