Skip to main content

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 :-)

Release files for barneySA 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for barneySA 1.0.1
File Size Uploaded
barneySA-1.0.1.tar.gz 4.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for barneySA 1.0.1
File Interpreter ABI Platform
barneySA-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 9.9 kB

Release files / barneySA-1.0.1.tar.gz

Download URL barneySA-1.0.1.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
48d6508e6210e1db1a6ea29dbd2d5a3eb544f9f0bc79eaf7a2437fd62d540633
BLAKE2b-256 checksum
How to use checksums
37a66e39d8e9179f3c8e7c34b00c1b2102e5e47096e88861fc779a5917eb983f
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / barneySA-1.0.1-py3-none-any.whl

Download URL barneySA-1.0.1-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3a5683e95b230321239b5fc6c36c511ee95eceb0171995973bb194eda89565a1
BLAKE2b-256 checksum
How to use checksums
40e67d9851cfd2564d3618e8f404e0aea29a87921caf65348f6910303b6cfeca
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release 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