Tension tools for posterior distributions
Project description
- Tensiometer:
A tool to test the level of agreement/disagreement between high dimensional posterior distributions.
- Homepage:
- Source:
- References:
2105.03324 (non-Gaussian tension metrics), 1806.04649 and 1912.04880 (Gaussian tension metrics), 2112.05737 (measured parameters).
Description
The tensiometer package is a collection of tools to help understanding the structure of high dimensional posterior distributions. In particular it implements a number of metrics to quantify the level of agreement/disagreement between different distributions. Some of these methods are based on a Gaussian approximation. Others are capable of capturing non-Gaussian features of the distributions thanks to machine learning techniques.
The best way to get up to speed is to walk through some worked example, based on what is needed:
Installation
The tensiometer package is available on PyPI and can be easily installed with:
pip install tensiometer
Alternatively one can download the source code from github:
git clone https://github.com/mraveri/tensiometer.git
and install it locally with the shortcut:
make install
You can test that the code is working properly by using:
make test
Dependencies
Tensiometer uses mostly standard python packages. Notable exceptions are GetDist, Tensorflow and Tensorflow Probability. Installing the last two is likely painful and we advice to not delegate that to automatic dependency resolvers…
For the full list of requirements see the requirements.txt file.
Testing the code
Tensiometer has a suite of unit tests to make sure everything is properly installed. This is especially useful considering that tensiometer relies on a number of external libraries.
To run all tests give the command:
make test
To run tests and get coverage statistics first make sure that the package coverage is installed. Then you can use the command:
make test_with_coverage
As you can see coverage is not complete, pull requests improving test coverage are most welcome.
Documentation
The documentation is automatically built for each release on readthedocs.
If you want to build locally the documentation you shoud install sphinx. Then you can install the readthedocs documentation format with:
pip install sphinx-rtd-theme
Then you can issue the command:
make documentation
Acknowledgements
We thank Samuel Goldstein, Shivam Pandey for help developing the code.
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 tensiometer-1.0.2.tar.gz
.
File metadata
- Download URL: tensiometer-1.0.2.tar.gz
- Upload date:
- Size: 110.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65928db196f5c9435d851a200a38093de6512e8c7362e2763b4ad8dac164eab8 |
|
MD5 | 9e68bb4c52dd9f64c73c2848e7b95c5b |
|
BLAKE2b-256 | a66359f88f65458fdbb7b591f56881acd069ef8c464fefda588409c8272d354b |
File details
Details for the file tensiometer-1.0.2-py3-none-any.whl
.
File metadata
- Download URL: tensiometer-1.0.2-py3-none-any.whl
- Upload date:
- Size: 116.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fab2dbcd3790c58d4872bf90ada35c2f36b0e412085879e51609a3d76f91ed3d |
|
MD5 | 0b4c1b8a91ffd813d40279075a5f59ea |
|
BLAKE2b-256 | 80c9bde08614683904b597c1fff5d9607c0b3f2aedd6b4d79364250b04ba120d |