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 parameter bounds for the new prior model,
  • prior_bounds parameter bounds for the original prior model,
  • log compute probability densities in log space,
  • prior_odds odds between the prior models, which defaults to unity,
  • second_model model to compute odds against instead of prior,
  • second_bounds parameter bounds for the second model,
  • detectable compare between detectable rather than intrinsic populations.

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

Uploaded Source

Built Distribution

popodds-0.7.1-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: popodds-0.7.1.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.18

File hashes

Hashes for popodds-0.7.1.tar.gz
Algorithm Hash digest
SHA256 4f1b80f548ef2d30950da3f1046899c45962c720bf5e6498e06fea6f5cc3ad71
MD5 47fbd7d9d6b90ba7730672e709dce913
BLAKE2b-256 a8001d758e7c27a8d72377cb3076f232777247d0a504ce4fb13ef398929c07e9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: popodds-0.7.1-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.18

File hashes

Hashes for popodds-0.7.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f2067e249461f21e72a12397540bcc3cfbeefdd126d0847b1b2ee96a01dd7571
MD5 7c37f837c93d101cf36aef159a8d919f
BLAKE2b-256 52c8b916262fa4710651d976b4d5835232c6a7be46c79337a8ca8b70802283ec

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page