pybmc is a Python package for performing Bayesian Model Combination (BMC) on various predictive models. It provides tools for data handling, orthogonalization, Gibbs sampling, and prediction with uncertainty quantification. The model combination methodology follows this paper by Giuliani et al.
- Data Management: Load and preprocess nuclear mass data from HDF5 and CSV files
- Orthogonalization: Transform model predictions using Singular Value Decomposition (SVD)
- Bayesian Inference: Perform Gibbs sampling for model combination
- Uncertainty Quantification: Generate predictions with credible intervals
- Model Evaluation: Calculate coverage statistics for model validation
pip install pybmcFor a detailed walkthrough of how to use the package, please see the Usage Guide.
This project uses Poetry for dependency management and packaging. Poetry is not required for regular users who install via pip install pybmc, but is needed for development and testing.
If you want to run the test suite:
Option 1: Using Poetry (recommended for development)
# Install Poetry if you don't have it
pip install poetry
# Install the package with dev dependencies
poetry install
# Run tests
poetry run pytest
# Run tests with coverage
poetry run pytest --cov=pybmcOption 2: Using pytest directly
# Install pytest and other test dependencies
pip install pytest pytest-cov
# Run tests
pytest
# Run tests with coverage
pytest --cov=pybmcFor more information on contributing and development workflows, see our Contribution Guidelines.
Comprehensive documentation is available at https://ascsn.github.io/pybmc/, including:
We welcome contributions! Please see our Contribution Guidelines for details on how to contribute to the project.
This project is licensed under the GPL-3.0 License - see the LICENSE file for details.
If you use pybmc in your research, please cite:
@software{pybmc,
title = {pybmc: Bayesian Model Combination},
author = {Kyle Godbey and Troy Dasher and Pablo Giuliani and An Le},
year = {2025},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/ascsn/pybmc}}
}For questions or support, please open an issue on our GitHub repository.
