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

Uploaded Source

Built Distribution

popodds-0.7.0-py3-none-any.whl (6.8 kB view hashes)

Uploaded Python 3

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