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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: popodds-0.5.1.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.1.tar.gz
Algorithm Hash digest
SHA256 6dfbdc931841599782c739870866469249d5b321278a6d47a215da716e7f0e3d
MD5 ddc7ec491998701863dadbdf76d014e3
BLAKE2b-256 ad2caa8d0cbea559997a3f68b78adda472612947e925ee4e6605cc2d88aa472f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: popodds-0.5.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 daa27469e698cd38dc2dac27cd34a8df73c0d45e97609ccddea3a848fbe8b63a
MD5 fb97e7bc2910b3d437cd4959ac2b6e22
BLAKE2b-256 8381743cedd849523107864a6f735459f082aff2048ea0f0a87ddec3910fcf0c

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