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

Uploaded Source

Built Distribution

popodds-0.3.2-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for popodds-0.3.2.tar.gz
Algorithm Hash digest
SHA256 b1cf1b435b4c7ae9af55d81aa1864614a46e14da63a9304b9332974d89945910
MD5 344ab9356668ccde12f97b0a55a9adea
BLAKE2b-256 77e8358056466e6805c35d6428fc0c5089c3882b9609d309b0abd26d2da6a801

See more details on using hashes here.

File details

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

File metadata

  • Download URL: popodds-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 4.1 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.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a3af837781ea10ab61041618059b699e7c5cf37689acabf4fced402dcc10c306
MD5 b646de1254c638a4cad4f30dc2d81604
BLAKE2b-256 8e642618d4b623840d0e8ec62d0509ac7c42857d00843cd5568651ffeb933a27

See more details on using hashes here.

Supported by

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