Simple package for Bayesian model comparison.
Project description
popodds
Simple package for Bayesian model comparison.
Given samples from a posterior distribution inferred under some default prior, compute the Bayes factor or odds in favour of a new prior model.
Installation
pip install popodds
Usage
The package consists of the ModelComparison
class to compute Bayes factors, and a wrapper function log_odds
for simplicity.
The computation only requires a few ingredients:
model
a new prior model or samples from it,prior
the original parameter estimation prior or samples from itsamples
samples from a parameter estimation run.
Optional:
model_bounds
optional parameter bounds for the new prior model,prior_bounds
optional parameter bounds for the original prior model,prior_odds
optional odds between the priors, which defaults to unity,second_model
option model to compute odds against instead of prior,second_model_bounds
optional parameter bounds for the second model.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
popodds-0.3.0.tar.gz
(3.6 kB
view details)
Built Distribution
File details
Details for the file popodds-0.3.0.tar.gz
.
File metadata
- Download URL: popodds-0.3.0.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ccb8430820ea5e5141eb8310b3b6b1e4079cb1374116042087dffa1595dd3dd5 |
|
MD5 | 9ff8fd8304ac545505a2caba86a3aa2f |
|
BLAKE2b-256 | 15c62c69cad60c25041584687467dcfd3f0850cc3ab54f92f83ac0401f4d5610 |
File details
Details for the file popodds-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: popodds-0.3.0-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97e35cfc26134134c7f1f0b5bd65d0c67e587a6a3779d18758c59b9295c76641 |
|
MD5 | f9f2488f8170e8119352e604b9d6dce6 |
|
BLAKE2b-256 | 2e176bbe025abfde5a5c484be416a0a6cc6e8a6ba130211ad45f4b5adeda35f3 |