Bayesian inference of algorithm performance using permutation models.
Project description
BayesPermus
Bayesian inference of algorithm performance using permutation models.
Installation
pip install BayesPermus
Usage
- Prepare permutation data:
permus = np.array([[1,2,3], [1,3,2]])
- 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-1.0.0.tar.gz
(8.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file BayesPermus-1.0.0.tar.gz.
File metadata
- Download URL: BayesPermus-1.0.0.tar.gz
- Upload date:
- Size: 8.9 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
683e465bd9f4f45df3d31becc7ec8492d28407a5643b24905cfa7427137851fa
|
|
| MD5 |
fdf3fc54bccfef519f1a6daa5e342a6f
|
|
| BLAKE2b-256 |
ef565280430a7b17cbaed1097bb1aef7d8987968e25d9f736607067c5632f63c
|
File details
Details for the file BayesPermus-1.0.0-py3-none-any.whl.
File metadata
- Download URL: BayesPermus-1.0.0-py3-none-any.whl
- Upload date:
- Size: 10.4 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fb7593ee5f086e66349eb7f83dc20e3d15fffc499ab190c5de6c8b7e6416bdfc
|
|
| MD5 |
1d6c36b808d428927869619dec2eaa63
|
|
| BLAKE2b-256 |
cee770f7fbf272e91712cdc01da4649c05f4de668b63de7379d394bbf4f7789f
|