Bedroc
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.
Metadata
Release files for bedroc 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| bedroc-0.2.0.tar.gz | 708.1 kB | Without provenance | Details for bedroc-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bedroc-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for bedroc-0.2.0-py3-none-any.whl |
Total release size: 752.0 kB
Release files / bedroc-0.2.0.tar.gz
| Download URL | bedroc-0.2.0.tar.gz |
|---|---|
| Size | 708.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a10f69870dbd673be1fc9a47977ce3c9976e104f9e2a0a07bf35b646e27c5318
|
|
BLAKE2b-256 checksum How to use checksums |
4600d7d5bc4b134ed6df36eb358d4c143c268662e245731719eccb6228a743d1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.7.20
|
Release files / bedroc-0.2.0-py3-none-any.whl
| Download URL | bedroc-0.2.0-py3-none-any.whl |
|---|---|
| Size | 43.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c9d19ccee4c3735b94be3e9acb2d5c6d84941135204fac2386cf7bd94bdae91e
|
|
BLAKE2b-256 checksum How to use checksums |
2966bb728435555cf6832816586730c93fb27e8d26b13bc4806b9fcee1356cdf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.7.20
|
Security for bedroc 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.