A python package for Bayesian model mixing
Project description
Taweret
Welcome to the GitHub repo for Taweret, the state of the art Python package for applying Bayesian Model Mixing!
About
Taweret is a new generalized package to help with applying Bayesian model mixing methods, developed by members of the BAND collaboration, to a wide variety of problems in physics.
Features
At present, this package possesses the following BMM methods:
- Linear model mixing ( With simultaneous model mixing and calibration)
- Multivariate BMM
- Bayesian Trees
Documentation
See Taweret's docs webpage here.
Cloning
This repository uses submodules. To clone this repository and automatically checkout all the submodules, use
git clone --recursive https://github.com/bandframework/Taweret.git
If you want to limit the size of the repository (this or the submodules), you can use the depth
flag
git clone --depth=1 https://github.com/bandframework/Taweret.git
Inside the directory containing the cloned repository, you then run
git submodule update --init --depth=1
Prerequisites
The Trees module depends on OpenMPI. Please ensure OpenMPI is installed with shared/built libraries prior to using the Trees module.
Testing
The test suite requires the pytest package to be installed and can be run from the test/
directory. To test the current BMM methods, first install the required packages and then run the following three lines of code:
To installing requirements, first navigate to the Taweret directory. The requirements.txt file is located in the root of this directory. Once in the Taweret directory, then execute the following line of code from the terminal.
pip install -e .
Once all installation is complete, proceed with testing by naviagating to the test/
directory and executing the following three lines of code.
pytest test_bivariate_linear.py
pytest test_gaussian.py
pytest test_trees.py
Windows Users:
Taweret also depends on the OpenBT Mixing package in order to execute the trees modulde. This package is built with OpenMPI thus Windows users can work with the trees module using Windows Subsystem for Linux. Installation instructions are shown below.
OpenBT will run within the Windows 10 Windows Subsystem for Linux (WSL) environment. For instructions on installing WSL, please see (https://ubuntu.com/wsl). We recommend installing the Ubuntu 20.04 WSL build. There are also instructions here on keeping your Ubuntu WSL up to date, or installing additional features like X support. Once you have installed the WSL Ubuntu layer, start the WSL Ubuntu shell from the start menu and then you can begin working with Taweret.
Running on Codespaces
GitHub's Codespaces is a great place to test using Taweret. Right now, you can try out Taweret's Bivariate Linear BMM and Multivariate BMM methods there, by following the instructions below.
- Click the dropdown arrow on the green 'code' button found at the top of this page.
- Click on the tab there that says 'codespaces'.
- Click the button for 'create Codespace on main'.
- Wait for the terminal to be finish spinning up a virtual environment and loading all needed variables (this can take a few minutes).
- Once that is done, navigate on the file tree to a notebook you wish to run. To run a file, you need to set a kernel for the Jupyter notebook, so click on 'choose a kernel' in the upper right hand corner of the notebook. If you haven't gotten this message already, a message will pop up that says 'install preferred Python extension?', and you should click 'yes'.
- When you click 'choose a kernel' it will offer a preferred Python version or a base version (usually a newer Python version). Choose whichever you prefer, and then you can run the notebook!
Citing Taweret
If you have benefited from Taweret, please cite our software using the following format:
@inproceedings{Taweret,
author = "Liyanage, Dan and Semposki, Alexandra and Yannotty, John and Ingles, Kevin",
title = "{{Taweret: A Python Package for Bayesian Model Mixing}}",
year = "2023",
url = {https://github.com/bandframework/Taweret}
}
and our explanatory paper:
@article{Ingles:2023nha,
author = "Ingles, Kevin and Liyanage, Dananjaya and Semposki, Alexandra C. and Yannotty, John C.",
title = "{Taweret: a Python package for Bayesian model mixing}",
eprint = "2310.20549",
archivePrefix = "arXiv",
primaryClass = "nucl-th",
month = "10",
year = "2023"
}
Please also cite the BAND collaboration software suite using the format here.
BAND SDK compliance
Check out our SDK form here.
Contact
To contact the Taweret team, please submit an issue through the Issues page.
Authors: Kevin Ingles, Dan Liyanage, Alexandra Semposki, and John Yannotty.
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 taweret-1.0.2.tar.gz
.
File metadata
- Download URL: taweret-1.0.2.tar.gz
- Upload date:
- Size: 84.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 29346334491f816e4824e024a0de9cb3ce6b3deb95b5d4f31e058cbffadf8596 |
|
MD5 | fcd255702413d42ffb570253127c2819 |
|
BLAKE2b-256 | fd99dabdc4613b27c3d02d0cee92b17b323ec05cde71030e4edc625d7edffee7 |
Provenance
File details
Details for the file Taweret-1.0.2-py3-none-any.whl
.
File metadata
- Download URL: Taweret-1.0.2-py3-none-any.whl
- Upload date:
- Size: 87.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a72567f0d2c4d2adbee0a0e85aae95ebcfe31aa6a9f7cdd8e4ce7e0dc9e14412 |
|
MD5 | 058fc9ef253a0e5b7b22ded3002ce295 |
|
BLAKE2b-256 | 90b7893b88f64ad4b89bb25187ad672cb373e4721a8126cba25c3f0e347c30ed |