Skip to main content

Bayesian inference of algorithm performance using permutation models.

Project description

BayesPermus

Bayesian inference of algorithm performance using permutation models.

Installation

pip install BayesPermus

Usage

  1. Prepare permutation data:
permus = np.array([[1,2,3], [1,3,2]])
  1. Obtain the marginal probabilities:
from BayesPermus.models.BradleyTerry import BradleyTerry

# BT Dirichlet hyper-priors
dirichlet_alpha_bt = [1, 1, 1]

# Create Bayesian inference model
bradleyTerry = BradleyTerry(dirichlet_alpha_bt, num_samples=1000)

# Calculate the marginal probabilities
probs = bradleyTerry.calculate_top_ranking_probs(permus)

Additional available models

  • Bradley-Terry:
from BayesPermus.models.BradleyTerry import BradleyTerry
  • Plackett-Luce:
from BayesPermus.models.PlackettLuce import PlackettLuceDirichlet
from BayesPermus.models.PlackettLuce import PlackettLuceGamma
  • Mallows Model:
from BayesPermus.models.MallowsModel import MallowsModel

Additional available marginals

  • Probability of an algorithm to be in the first position: model.calculate_top_ranking_probs(...).
  • Probability of an algorithm to outperform another: model.calculate_better_than_probs(...).
  • Probability of an algorithm to be in the top-k ranking: model.calculate_top_k_probs(...).

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

BayesPermus-0.0.3.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

BayesPermus-0.0.3-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file BayesPermus-0.0.3.tar.gz.

File metadata

  • Download URL: BayesPermus-0.0.3.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.10

File hashes

Hashes for BayesPermus-0.0.3.tar.gz
Algorithm Hash digest
SHA256 1481cb585b27cea7e7e9ad7f9b46cf82efea76b5e6b4ceec5071849cccdcff81
MD5 aed4185c3ba7c3f26d755ba4cb00e44a
BLAKE2b-256 3c35626ce8112738f008e5b47623035204f571d0bdeb1ddbf31b58016ff60f71

See more details on using hashes here.

File details

Details for the file BayesPermus-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: BayesPermus-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.10

File hashes

Hashes for BayesPermus-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 431e3c17f0de536460295c2f70c6c06777272424c53786819d3aaec0ee96a7b6
MD5 a1294f1c2036bbd038284a3c69da7852
BLAKE2b-256 c4d299f34b862eba277335a3334e293fa8c6a5c1f00bfc367b6ef390aeed9eb9

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