choix
choix is a Python library that provides inference algorithms for models based on Luce's choice axiom. These probabilistic models can be used to explain and predict outcomes of comparisons between items.
- Pairwise comparisons: when the data consists of comparisons between two items, the model variant is usually referred to as the Bradley-Terry model. It is closely related to the Elo rating system used to rank chess players.
- Partial rankings: when the data consists of rankings over (a subset of) the items, the model variant is usually referred to as the Plackett-Luce model.
- Top-1 lists: another variation of the model arises when the data consists of discrete choices, i.e., we observe the selection of one item out of a subset of items.
- Choices in a network: when the data consists of counts of the number of visits to each node in a network, the model is known as the Network Choice Model.
choix makes it easy to infer model parameters from these different types of data, using a variety of algorithms:
- Luce Spectral Ranking
- Minorization-Maximization
- Rank Centrality
- Approximate Bayesian inference with expectation propagation
Getting started
To install the latest release directly from PyPI, simply type:
pip install choix
To get started, you might want to explore one of these notebooks:
- Introduction using pairwise-comparison data
- Case study: analyzing the GIFGIF dataset
- Using ChoiceRank to understand traffic on a network
- Approximate Bayesian inference using EP
You can also find more information on the official documentation. In particular, the API reference contains a good summary of the library's features.
References
- Hossein Azari Soufiani, William Z. Chen, David C. Parkes, and Lirong Xia, Generalized Method-of-Moments for Rank Aggregation, NIPS 2013
- François Caron and Arnaud Doucet. Efficient Bayesian Inference for Generalized Bradley-Terry models. Journal of Computational and Graphical Statistics, 21(1):174-196, 2012.
- Wei Chu and Zoubin Ghahramani, Extensions of Gaussian processes for ranking: semi-supervised and active learning, NIPS 2005 Workshop on Learning to Rank.
- David R. Hunter. MM algorithms for generalized Bradley-Terry models, The Annals of Statistics 32(1):384-406, 2004.
- Ravi Kumar, Andrew Tomkins, Sergei Vassilvitskii and Erik Vee, Inverting a Steady-State, WSDM 2015.
- Lucas Maystre and Matthias Grossglauser, Fast and Accurate Inference of Plackett-Luce Models, NIPS, 2015.
- Lucas Maystre and M. Grossglauser, ChoiceRank: Identifying Preferences from Node Traffic in Networks, ICML 2017.
- Sahand Negahban, Sewoong Oh, and Devavrat Shah, Iterative Ranking from Pair-wise Comparison, NIPS 2012.
Metadata
Release files for choix 0.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| choix-0.4.1.tar.gz | 112.4 kB | Without provenance | Details for choix-0.4.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| choix-0.4.1-py3-none-any.whl | Python 3 | none | any | Details for choix-0.4.1-py3-none-any.whl |
Total release size: 133.0 kB
Release files / choix-0.4.1.tar.gz
| Download URL | choix-0.4.1.tar.gz |
|---|---|
| Size | 112.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7c85d13845400932508c45a6a6a3e7a44f637969ffd506e1c7f5db07de1560b4
|
|
BLAKE2b-256 checksum How to use checksums |
cc839c9b9aa651e16813ca893b70f4384f2e9c369eafd5922f4ddaf32cde2e9e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|
Release files / choix-0.4.1-py3-none-any.whl
| Download URL | choix-0.4.1-py3-none-any.whl |
|---|---|
| Size | 20.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
15fe145ffc194dc6b4ba5a44ef24667fa0107578fb5b36723ab0b5e87eeae29f
|
|
BLAKE2b-256 checksum How to use checksums |
81f18ce3fa2fe1649c93ab7e177c3b11b9fd98c66180af3a365cfe7bd0118806
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|
Security for choix 0.4.1
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.