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,log
option to compute probability densities in log space,prior_odds
optional odds between the priors, which defaults to unity,second_model
optional model to compute odds against instead of prior,second_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.2.tar.gz
(3.9 kB
view details)
Built Distribution
File details
Details for the file popodds-0.3.2.tar.gz
.
File metadata
- Download URL: popodds-0.3.2.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
b1cf1b435b4c7ae9af55d81aa1864614a46e14da63a9304b9332974d89945910
|
|
MD5 |
344ab9356668ccde12f97b0a55a9adea
|
|
BLAKE2b-256 |
77e8358056466e6805c35d6428fc0c5089c3882b9609d309b0abd26d2da6a801
|
File details
Details for the file popodds-0.3.2-py3-none-any.whl
.
File metadata
- Download URL: popodds-0.3.2-py3-none-any.whl
- Upload date:
- Size: 4.1 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 |
a3af837781ea10ab61041618059b699e7c5cf37689acabf4fced402dcc10c306
|
|
MD5 |
b646de1254c638a4cad4f30dc2d81604
|
|
BLAKE2b-256 |
8e642618d4b623840d0e8ec62d0509ac7c42857d00843cd5568651ffeb933a27
|