Skip to main content

Bayesian engine for determining rock origins and compositions

Project description

bedroc logo

Bedroc

Release 0.2.0 Python 3.11+ License: GPL v3 CI Checked with pyright bear-ified Test coverage

About

Bedroc—short for "Bayesian Engine for Determining Rock Origin and Composition"—is a Python package for applying Bayesian hierarchical modeling and probabilistic inference to research questions in geochemistry and petrology. It is designed to enable robust statistical analysis of complex datasets, accounting for uncertainty, partial pooling, and feature-wise variability. It is released under The GNU General Public License v3.0 or later.

Although Bedroc originated within geochemistry and petrology, the underlying infrastructure is intentionally general. The package implements standard Bayesian modeling workflows—such as group-difference analysis, predictor-based models, uncertainty quantification, and hierarchical partial pooling—that are widely applicable across many scientific domains. As a result, Bedroc can be readily adapted for broader applications in Earth and planetary sciences, as well as other fields that benefit from principled statistical modeling and reproducible Bayesian inference.

Authors:

  • Dan J. Bower

Documentation

The documentation is available online, with options to download it in EPUB or PDF format:

https://bedroc.readthedocs.io/en/latest/

Quick install

Bedroc is a Python package that can be installed on a variety of platforms (e.g. Mac, Windows, Linux). It is recommended to install Bedroc in a dedicated Python environment. Before installation, create and activate the environment, then run:

pip install bedroc

Downloading the source code is also recommended if you'd like access to the example notebooks in notebooks/.

Citation

Please cite this GitHub repository and the specific Bedroc version number you used when using Bedroc in your research.

Basic usage

Jupyter notebooks in the notebooks/ directory demonstrate the core workflow of Bedroc. These notebooks serve as example scripts, typically using synthetic data to illustrate the basic principles of Bayesian analysis, including model construction, sampling, diagnostics, and plot generation.

Each notebook delegates most of the real work to the underlying functions and classes provided by the bedroc package. This keeps the examples clear and highlights how to connect the high-level workflow to the package internals.

The recommended workflow is to copy one of the notebooks and adapt it to your own needs. Since most of the underlying infrastructure is designed to accept NumPy arrays, the main modification you’ll need is to preprocess your own "real" data into an appropriate array format before passing it to the relevant functions.

Please note that bespoke or project-specific analysis scripts should not be committed back into this repository. This repository is intended to contain only the core, reusable, and generic infrastructure of Bedroc, keeping it clean, maintainable, and broadly applicable.

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

bedroc-0.2.0.tar.gz (708.1 kB view details)

Uploaded Source

Built Distribution

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

bedroc-0.2.0-py3-none-any.whl (43.8 kB view details)

Uploaded Python 3

File details

Details for the file bedroc-0.2.0.tar.gz.

File metadata

  • Download URL: bedroc-0.2.0.tar.gz
  • Upload date:
  • Size: 708.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.7.20

File hashes

Hashes for bedroc-0.2.0.tar.gz
Algorithm Hash digest
SHA256 a10f69870dbd673be1fc9a47977ce3c9976e104f9e2a0a07bf35b646e27c5318
MD5 fb4930d562326c08bc8b423d9b14cf8e
BLAKE2b-256 4600d7d5bc4b134ed6df36eb358d4c143c268662e245731719eccb6228a743d1

See more details on using hashes here.

File details

Details for the file bedroc-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: bedroc-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 43.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.7.20

File hashes

Hashes for bedroc-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c9d19ccee4c3735b94be3e9acb2d5c6d84941135204fac2386cf7bd94bdae91e
MD5 63fb8782c65671e2c2c5c3a916a69f07
BLAKE2b-256 2966bb728435555cf6832816586730c93fb27e8d26b13bc4806b9fcee1356cdf

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