Skip to main content

A package for Bayesian model combination

Project description

pyBMC: A General Bayesian Model Combination Package

Coverage Status

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.

Features

  • 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

Installation

pip install pybmc

Quick Start

For a detailed walkthrough of how to use the package, please see the Usage Guide.

Development and Testing

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.

Running Tests

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=pybmc

Option 2: Using pytest directly

# Install pytest and other test dependencies
pip install pytest pytest-cov

# Run tests
pytest

# Run tests with coverage
pytest --cov=pybmc

For more information on contributing and development workflows, see our Contribution Guidelines.

Documentation

Comprehensive documentation is available at https://ascsn.github.io/pybmc/, including:

Contributing

We welcome contributions! Please see our Contribution Guidelines for details on how to contribute to the project.

License

This project is licensed under the GPL-3.0 License - see the LICENSE file for details.

Citation

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}}
}

Support

For questions or support, please open an issue on our GitHub repository.

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

pybmc-0.2.4.tar.gz (10.5 MB view details)

Uploaded Source

Built Distribution

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

pybmc-0.2.4-py3-none-any.whl (10.5 MB view details)

Uploaded Python 3

File details

Details for the file pybmc-0.2.4.tar.gz.

File metadata

  • Download URL: pybmc-0.2.4.tar.gz
  • Upload date:
  • Size: 10.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.12.3 Linux/6.14.0-1012-azure

File hashes

Hashes for pybmc-0.2.4.tar.gz
Algorithm Hash digest
SHA256 e570220a39df78f9cfa301056dfc00d1dabc794963e3eb876e8fedc1c044f148
MD5 893e1b1fc8a8b0c366c3779952e376f9
BLAKE2b-256 f496b1e8ef8b9692ac373ab651f89f8626e3175bccf289e5102834f55f1fe351

See more details on using hashes here.

File details

Details for the file pybmc-0.2.4-py3-none-any.whl.

File metadata

  • Download URL: pybmc-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 10.5 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.12.3 Linux/6.14.0-1012-azure

File hashes

Hashes for pybmc-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 d630cad5b829826777aa96b221562a714530185aaba378110b4779658337cea7
MD5 5b8c74fc43364b5e5d94fb24aab44b34
BLAKE2b-256 cc2611fd67b726a698cfee48cc580ef4c810775b7869a6bbf0077ea76c21bc7e

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