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:
modela new prior model or samples from it,priorthe original parameter estimation prior or samples from itsamplessamples from a parameter estimation run.
Optional:
model_boundsoptional parameter bounds for the new prior model,prior_boundsoptional parameter bounds for the original prior model,logoption to compute probability densities in log space,prior_oddsoptional odds between the priors, which defaults to unity,second_modeloptional model to compute odds against instead of prior,second_boundsoptional parameter bounds for the second model.
Metadata
Release files for popodds 0.3.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| popodds-0.3.2.tar.gz | 3.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| popodds-0.3.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.0 kB
Release files / popodds-0.3.2.tar.gz
| Download URL | popodds-0.3.2.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b1cf1b435b4c7ae9af55d81aa1864614a46e14da63a9304b9332974d89945910
|
|
BLAKE2b-256 checksum How to use checksums |
77e8358056466e6805c35d6428fc0c5089c3882b9609d309b0abd26d2da6a801
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Release files / popodds-0.3.2-py3-none-any.whl
| Download URL | popodds-0.3.2-py3-none-any.whl |
|---|---|
| Size | 4.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a3af837781ea10ab61041618059b699e7c5cf37689acabf4fced402dcc10c306
|
|
BLAKE2b-256 checksum How to use checksums |
8e642618d4b623840d0e8ec62d0509ac7c42857d00843cd5568651ffeb933a27
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|