Skip to main content

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 it
  • samples 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


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.4.0.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

popodds-0.4.0-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file popodds-0.4.0.tar.gz.

File metadata

  • Download URL: popodds-0.4.0.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for popodds-0.4.0.tar.gz
Algorithm Hash digest
SHA256 24d575296836165e15682ee86fb3874eea72a543280dee01c4300ed1d4c39977
MD5 38fe4656cf2730f3f885d1f43232ce9b
BLAKE2b-256 e0a6bd18b4795538d6d694eda76c8a9261cdf613f48a153173778b8a00845050

See more details on using hashes here.

File details

Details for the file popodds-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: popodds-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for popodds-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e816bfe9cee3925f54272f139039e9fd55d519fc742c13666f4afb3d5bcdadb7
MD5 0db500d1acb44d17c8100c7aaba530cc
BLAKE2b-256 7f3a573b160332e78f105b619b806109ff0ebdb4d52c9e5fd254efac156d70f8

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