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

Uploaded Source

Built Distribution

popodds-0.5.0-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for popodds-0.5.0.tar.gz
Algorithm Hash digest
SHA256 7d5157cf64d6436c0fcd9f949913764a69605fb414569cafa2f338b59742adf2
MD5 59055417d360c0dc37cc96791d77b754
BLAKE2b-256 bbcfe13b12b78c03734f78a95130267d963bd0e2605fc612bb267d107309a918

See more details on using hashes here.

File details

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

File metadata

  • Download URL: popodds-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 4.9 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.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 56f6027afc120d80a4ee17963576e1b3bd4450bdf577e241fbc9c40c40414f0b
MD5 d51882a161f70b37ca79b434d4eff1b2
BLAKE2b-256 f838136e954b324592c101712e7492c8046b1fbbc1cb55f28cf57a7c2fe02bf9

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