Skip to main content

Tension tools for posterior distributions

Project description

Tensiometer:

A tool to test the level of agreement/disagreement between high dimensional posterior distributions.

Author:

Marco Raveri and Cyrille Doux

Homepage:

https://tensiometer.readthedocs.io

Source:

https://github.com/mraveri/tensiometer

References:

2105.03324 (non-Gaussian tension metrics), 1806.04649 and 1912.04880 (Gaussian tension metrics), 2112.05737 (measured parameters), 2409.09101 (synthetic probability and posterior profiles)

https://github.com/mraveri/tensiometer/actions/workflows/test.yml/badge.svg https://readthedocs.org/projects/tensiometer/badge/?version=latest https://coveralls.io/repos/github/mraveri/tensiometer/badge.svg?branch=master https://img.shields.io/pypi/v/tensiometer.svg?style=flat

Description

Tensiometer is a collection of tools to help understand 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

Documentation build

To refresh the example notebook HTML outputs before building the docs, run:

make prepare_examples

Then build the documentation locally with:

make documentation

Acknowledgements

We thank Samuel Goldstein, Shivam Pandey for help developing the code.

Project details


Download files

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

Source Distribution

tensiometer-1.1.0.tar.gz (199.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tensiometer-1.1.0-py3-none-any.whl (218.5 kB view details)

Uploaded Python 3

File details

Details for the file tensiometer-1.1.0.tar.gz.

File metadata

  • Download URL: tensiometer-1.1.0.tar.gz
  • Upload date:
  • Size: 199.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for tensiometer-1.1.0.tar.gz
Algorithm Hash digest
SHA256 ba73384cd593bd6273bcd1d34885d0655a0dec6a227d1d379ac15171d38344e3
MD5 0fbbb80cfc48521a96355184f95d6b52
BLAKE2b-256 48c5229ec2abc4065c889670b880ce5c6d7eba474723e7dd187d2da6ec367ccf

See more details on using hashes here.

File details

Details for the file tensiometer-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: tensiometer-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 218.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for tensiometer-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2a7045d939842230381ee314da5de9193c1ecb23a2f67af27523b3985ef08e27
MD5 39623d0389ab4d970d66887d5a031b14
BLAKE2b-256 26c2db98c196fb17ee09c2c91c1c3f8f12b138c6114df394e69235ec30ef6f83

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page