choix


Namechoix JSON
Version 0.4.1 PyPI version JSON
download
home_pageNone
SummaryInference algorithms for models based on Luce's choice axiom.
upload_time2025-08-10 20:19:45
maintainerNone
docs_urlNone
authorLucas Maystre
requires_python>=3.10
licenseNone
keywords statistics ml bradley-terry plackett-luce choice comparison ranking
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # choix

[![Build package](https://github.com/lucasmaystre/choix/actions/workflows/build.yml/badge.svg)](https://github.com/lucasmaystre/choix/actions/workflows/build.yml)
[![code coverage](https://codecov.io/gh/lucasmaystre/choix/branch/master/graph/badge.svg)](https://codecov.io/gh/lucasmaystre/choix)
[![documentation status](https://readthedocs.org/projects/choix/badge/?version=latest)](http://choix.lum.li/en/latest/?badge=latest)

`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](https://github.com/lucasmaystre/choix/blob/master/notebooks/intro-pairwise.ipynb)
- [Case study: analyzing the GIFGIF dataset](https://github.com/lucasmaystre/choix/blob/master/notebooks/gifgif-dataset.ipynb)
- [Using ChoiceRank to understand traffic on a network](https://github.com/lucasmaystre/choix/blob/master/notebooks/choicerank-tutorial.ipynb)
- [Approximate Bayesian inference using EP](https://github.com/lucasmaystre/choix/blob/master/notebooks/ep-example.ipynb)

You can also find more information on the [official documentation](http://choix.lum.li/en/latest/). In particular, the [API reference](http://choix.lum.li/en/latest/api.html) 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](https://papers.nips.cc/paper/4997-generalized-method-of-moments-for-rank-aggregation.pdf), NIPS 2013
- François Caron and Arnaud Doucet. [Efficient Bayesian Inference for Generalized Bradley-Terry models](https://hal.inria.fr/inria-00533638/document). 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](http://www.gatsby.ucl.ac.uk/~chuwei/paper/gprl.pdf), NIPS 2005 Workshop on Learning to Rank.
- David R. Hunter. [MM algorithms for generalized Bradley-Terry models](http://sites.stat.psu.edu/~dhunter/papers/bt.pdf), The Annals of Statistics 32(1):384-406, 2004.
- Ravi Kumar, Andrew Tomkins, Sergei Vassilvitskii and Erik Vee,
  [Inverting a Steady-State](http://theory.stanford.edu/~sergei/papers/wsdm15-cset.pdf), WSDM 2015.
- Lucas Maystre and Matthias Grossglauser, [Fast and Accurate Inference of Plackett-Luce Models](https://infoscience.epfl.ch/record/213486/files/fastinference.pdf), NIPS, 2015.
- Lucas Maystre and M. Grossglauser, [ChoiceRank: Identifying Preferences from Node Traffic in Networks](https://infoscience.epfl.ch/record/229164/files/choicerank.pdf), ICML 2017.
- Sahand Negahban, Sewoong Oh, and Devavrat Shah, [Iterative Ranking from Pair-wise Comparison](https://papers.nips.cc/paper/4701-iterative-ranking-from-pair-wise-comparisons.pdf), NIPS 2012.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "choix",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "statistics, ml, bradley-terry, plackett-luce, choice, comparison, ranking",
    "author": "Lucas Maystre",
    "author_email": "Lucas Maystre <lucas@maystre.ch>",
    "download_url": "https://files.pythonhosted.org/packages/cc/83/9c9b9aa651e16813ca893b70f4384f2e9c369eafd5922f4ddaf32cde2e9e/choix-0.4.1.tar.gz",
    "platform": null,
    "description": "# choix\n\n[![Build package](https://github.com/lucasmaystre/choix/actions/workflows/build.yml/badge.svg)](https://github.com/lucasmaystre/choix/actions/workflows/build.yml)\n[![code coverage](https://codecov.io/gh/lucasmaystre/choix/branch/master/graph/badge.svg)](https://codecov.io/gh/lucasmaystre/choix)\n[![documentation status](https://readthedocs.org/projects/choix/badge/?version=latest)](http://choix.lum.li/en/latest/?badge=latest)\n\n`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.\n\n- **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.\n- **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.\n- **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.\n- **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*.\n\n`choix` makes it easy to infer model parameters from these different types of data, using a variety of algorithms:\n\n- Luce Spectral Ranking\n- Minorization-Maximization\n- Rank Centrality\n- Approximate Bayesian inference with expectation propagation\n\n## Getting started\n\nTo install the latest release directly from PyPI, simply type:\n\n    pip install choix\n\nTo get started, you might want to explore one of these notebooks:\n\n- [Introduction using pairwise-comparison data](https://github.com/lucasmaystre/choix/blob/master/notebooks/intro-pairwise.ipynb)\n- [Case study: analyzing the GIFGIF dataset](https://github.com/lucasmaystre/choix/blob/master/notebooks/gifgif-dataset.ipynb)\n- [Using ChoiceRank to understand traffic on a network](https://github.com/lucasmaystre/choix/blob/master/notebooks/choicerank-tutorial.ipynb)\n- [Approximate Bayesian inference using EP](https://github.com/lucasmaystre/choix/blob/master/notebooks/ep-example.ipynb)\n\nYou can also find more information on the [official documentation](http://choix.lum.li/en/latest/). In particular, the [API reference](http://choix.lum.li/en/latest/api.html) contains a good summary of the library's features.\n\n## References\n\n- Hossein Azari Soufiani, William Z. Chen, David C. Parkes, and Lirong Xia, [Generalized Method-of-Moments for Rank Aggregation](https://papers.nips.cc/paper/4997-generalized-method-of-moments-for-rank-aggregation.pdf), NIPS 2013\n- Fran\u00e7ois Caron and Arnaud Doucet. [Efficient Bayesian Inference for Generalized Bradley-Terry models](https://hal.inria.fr/inria-00533638/document). Journal of Computational and Graphical Statistics, 21(1):174-196, 2012.\n- Wei Chu and Zoubin Ghahramani, [Extensions of Gaussian processes for ranking: semi-supervised and active learning](http://www.gatsby.ucl.ac.uk/~chuwei/paper/gprl.pdf), NIPS 2005 Workshop on Learning to Rank.\n- David R. Hunter. [MM algorithms for generalized Bradley-Terry models](http://sites.stat.psu.edu/~dhunter/papers/bt.pdf), The Annals of Statistics 32(1):384-406, 2004.\n- Ravi Kumar, Andrew Tomkins, Sergei Vassilvitskii and Erik Vee,\n  [Inverting a Steady-State](http://theory.stanford.edu/~sergei/papers/wsdm15-cset.pdf), WSDM 2015.\n- Lucas Maystre and Matthias Grossglauser, [Fast and Accurate Inference of Plackett-Luce Models](https://infoscience.epfl.ch/record/213486/files/fastinference.pdf), NIPS, 2015.\n- Lucas Maystre and M. Grossglauser, [ChoiceRank: Identifying Preferences from Node Traffic in Networks](https://infoscience.epfl.ch/record/229164/files/choicerank.pdf), ICML 2017.\n- Sahand Negahban, Sewoong Oh, and Devavrat Shah, [Iterative Ranking from Pair-wise Comparison](https://papers.nips.cc/paper/4701-iterative-ranking-from-pair-wise-comparisons.pdf), NIPS 2012.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Inference algorithms for models based on Luce's choice axiom.",
    "version": "0.4.1",
    "project_urls": {
        "Documentation": "https://choix.lum.li/en/latest/",
        "Homepage": "https://github.com/lucasmaystre/choix",
        "Issues": "https://github.com/lucasmaystre/choix/issues",
        "Repository": "https://github.com/lucasmaystre/choix.git"
    },
    "split_keywords": [
        "statistics",
        " ml",
        " bradley-terry",
        " plackett-luce",
        " choice",
        " comparison",
        " ranking"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "81f18ce3fa2fe1649c93ab7e177c3b11b9fd98c66180af3a365cfe7bd0118806",
                "md5": "bbf1529b1e525fd5a27dbf0f001926e1",
                "sha256": "15fe145ffc194dc6b4ba5a44ef24667fa0107578fb5b36723ab0b5e87eeae29f"
            },
            "downloads": -1,
            "filename": "choix-0.4.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "bbf1529b1e525fd5a27dbf0f001926e1",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 20575,
            "upload_time": "2025-08-10T20:19:44",
            "upload_time_iso_8601": "2025-08-10T20:19:44.255036Z",
            "url": "https://files.pythonhosted.org/packages/81/f1/8ce3fa2fe1649c93ab7e177c3b11b9fd98c66180af3a365cfe7bd0118806/choix-0.4.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "cc839c9b9aa651e16813ca893b70f4384f2e9c369eafd5922f4ddaf32cde2e9e",
                "md5": "1962dfa59d64337b9857cff053d9c7d3",
                "sha256": "7c85d13845400932508c45a6a6a3e7a44f637969ffd506e1c7f5db07de1560b4"
            },
            "downloads": -1,
            "filename": "choix-0.4.1.tar.gz",
            "has_sig": false,
            "md5_digest": "1962dfa59d64337b9857cff053d9c7d3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 112425,
            "upload_time": "2025-08-10T20:19:45",
            "upload_time_iso_8601": "2025-08-10T20:19:45.346610Z",
            "url": "https://files.pythonhosted.org/packages/cc/83/9c9b9aa651e16813ca893b70f4384f2e9c369eafd5922f4ddaf32cde2e9e/choix-0.4.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-10 20:19:45",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "lucasmaystre",
    "github_project": "choix",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "choix"
}
        
Elapsed time: 2.80158s