A general-purpose sensitivity analsysi library based on fractional factorial design and the analysis of variance
Project description
barneySA
A general-purpose library for sensitivity analysis using fractional factorial design and analysis of variance. The library conducts sensitivity analysis on a given model based on the ranges provided for the parameters. Basically, barneySA does the followings:
-
Sample from the n-dimensional space of the parameters using fractional factorial design
-
Create a parameter set for each of sample sets
-
Run the given model for each parameter set and collect distance value
-
Conduct the analysis of variance to determine the relative importance of parameters with respect to one another
Getting started
Quick start
pip install --upgrade barneySA
# inside your script, e.g. test.py
from barneySA import tools
free_params = { # define the parameters and their range
'P1' = [2,3],
'P2' = [1.2,4.3]
}
settings = { # define settings
"MPI_flag": True,
"replica_n": 2,
"output_path": "outputs/SA",
"model":MODEL # this is your model
}
obj = tools.SA(free_params = free_params,settings = settings)
obj.sample()
obj.run()
obj.postprocess()
# in terminal
mpiexec -n 'cpu_numbers' python test.py
barneySA receives two inputs from users. First, the free parameters' list that is a python dictionary that contains the names and bounds (min and max) of each free parameter. Second, the settings that is another python dictionary that contains specifications of SA. Inside the specification, the model which is an object of the fomulated problem needs to be provided. The model object should have a function named 'run' that receives a parameter set (a sample of the given free parameters) and results in a distance value based on the goodness of fit considered for the problem in hand.
Outputs
The library results in a value for each free parameters that shows the importance of that parameter with respect to the rest of the parameters.
Authors
- Jalil Nourisa
Acknowledgments
No one yet. Give some feedback so your name would appear here :-)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file barneySA-1.0.1.tar.gz
.
File metadata
- Download URL: barneySA-1.0.1.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.1.post20201107 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48d6508e6210e1db1a6ea29dbd2d5a3eb544f9f0bc79eaf7a2437fd62d540633 |
|
MD5 | 33df595030b4c40954b6f047be10ff78 |
|
BLAKE2b-256 | 37a66e39d8e9179f3c8e7c34b00c1b2102e5e47096e88861fc779a5917eb983f |
File details
Details for the file barneySA-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: barneySA-1.0.1-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.1.post20201107 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a5683e95b230321239b5fc6c36c511ee95eceb0171995973bb194eda89565a1 |
|
MD5 | aa697eebbbd953b6963aa1d35a27c7fb |
|
BLAKE2b-256 | 40e67d9851cfd2564d3618e8f404e0aea29a87921caf65348f6910303b6cfeca |