Skip to main content

Bayesian engine for determining rock origins and compositions

Project description

bedroc logo

Bedroc

Release 0.1.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.1.0.tar.gz (687.8 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.1.0-py3-none-any.whl (24.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for bedroc-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fcc672eb25e35d75fc2e30874994a997defb263c8bcca1338c355f68f7d50cdb
MD5 45ecdc30941ec9d05f33d4c203788141
BLAKE2b-256 2fb4be2b704e284db115ef388602fd3a117c0ff3cef6555d1ae541e4dac905a9

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for bedroc-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ca73395bdf21242337d53ebaaeaa0aa511085ffa7995b2313c3d51011e2ab242
MD5 bcfc937ef62d9acbf09f2b0819b3a286
BLAKE2b-256 eff65e0a2cb72a8e104657a468fed6438818fe8f7813b4aa1f9ad86b13c30c62

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