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-0.0.4.tar.gz
(7.6 kB
view details)
Built Distribution
File details
Details for the file BayesPermus-0.0.4.tar.gz
.
File metadata
- Download URL: BayesPermus-0.0.4.tar.gz
- Upload date:
- Size: 7.6 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 | 60c5fcb4e825d82d17c37e08069782af76321871f3ae93ad02c4a304b2b615d9 |
|
MD5 | 87d8bc9da37d8f74a92c571312c14cf5 |
|
BLAKE2b-256 | 17c5b1b1840bd7e51e568584f071cbf0681da0ffafdefcc8164e901b62997245 |
File details
Details for the file BayesPermus-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: BayesPermus-0.0.4-py3-none-any.whl
- Upload date:
- Size: 9.8 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 | 35adee534fa294700da6d4a56fcaa35cfe7d8ced4e9346ca9d8e2c0248bc6a5f |
|
MD5 | 64b3c869a0cbefebe1dd40d59621208c |
|
BLAKE2b-256 | 7f6b403dc76a3eeae201fadfc80e0983b71815f7f9a591951a29e5ef947483de |