Skip to main content

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(...).

Metadata

Release files for BayesPermus 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for BayesPermus 1.0.0
File Size Uploaded Provenance
BayesPermus-1.0.0.tar.gz 8.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for BayesPermus 1.0.0
File Interpreter ABI Platform
BayesPermus-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 19.2 kB

Release files / BayesPermus-1.0.0.tar.gz

Download URL BayesPermus-1.0.0.tar.gz
Size 8.9 kB
Tags Source
SHA-256 checksum
How to use checksums
683e465bd9f4f45df3d31becc7ec8492d28407a5643b24905cfa7427137851fa
BLAKE2b-256 checksum
How to use checksums
ef565280430a7b17cbaed1097bb1aef7d8987968e25d9f736607067c5632f63c
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / BayesPermus-1.0.0-py3-none-any.whl

Download URL BayesPermus-1.0.0-py3-none-any.whl
Size 10.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fb7593ee5f086e66349eb7f83dc20e3d15fffc499ab190c5de6c8b7e6416bdfc
BLAKE2b-256 checksum
How to use checksums
cee770f7fbf272e91712cdc01da4649c05f4de668b63de7379d394bbf4f7789f
Upload date
Uploaded using Trusted Publishing?
What is 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

Security for BayesPermus 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page