Coder Social home page Coder Social logo

abcvoting's Introduction

DOI MIT License PyPi Python versions Code style: black Build badge Unittests badge codecov docs

abcvoting

A Python library of approval-based committee (ABC) rules

Approval-based committee rules (ABC rules) are voting methods for selecting a committee, i.e., a fixed-size subset of candidates. ABC rules are also known as approval-based multi-winner rules. The input of such rules are approval ballots. We recommend the book (Multi-Winner Voting with Approval Preferences) by Lackner and Skowron [2] as a detailed introduction to ABC rules and related research directions. In addition, the survey by Faliszewski et al. [1] is useful as a more general introduction to committee voting (not limited to approval ballots).

The following ABC rules are implemented:

  • Approval Voting (AV)

  • Satisfaction Approval Voting (SAV)

  • Proportional Approval Voting (PAV)

  • Sequential Proportional Approval Voting (seq-PAV)

  • Reverse Sequential Proportional Approval Voting (revseq-PAV)

  • Approval Chamberlin-Courant (CC)

  • Phragmén's sequential rule

  • Monroe's rule

  • Minimax Approval Voting (MAV)

  • Greedy Monroe

  • Method of Equal Shares (Rule X)

  • Phragmén's First Method (Eneström's Method)

  • and many more ...

Installation

As simple as:

pip install abcvoting

Further details can be found here.

Development

Install all dependencies including development requirements and the abcvoting package in development mode:

pip install -e .[dev]

Basic unit tests can be run by excluding tests which require additional dependencies:

pytest  -m "not mipgurobi and not gmpy2 and not slow" tests/

For development, configure the black formatter and pre-commit hooks - see below. Also installing all optional dependencies is recommended.

A development package is build for every commit on the master branch and uploaded to the test instance of PyPI. It can be installed using the following command:

python3 -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple abcvoting

Black formatting

Code needs to be formatted using the black formatter. This is checked by Github actions. Configure your editor to run the black formatter.

Pre-commit hooks

Pre-commit hooks are not required, but they are recommended for development. Pre-commit is used to manage and maintain pre-commit hooks. Install pre-commit (e.g. via apt, conda or pip) and then run $ pre-commit install to install the hooks.

References

[1] Piotr Faliszewski, Piotr Skowron, Arkadii Slinko, and Nimrod Talmon. Multiwinner voting: A new challenge for social choice theory. In Ulle Endriss, editor, Trends in Computational Social Choice, chapter 2, pages 27–47. AI Access, 2017. http://research.illc.uva.nl/COST-IC1205/BookDocs/Chapters/TrendsCOMSOC-02.pdf

[2] Lackner, Martin, and Piotr Skowron. "Multi-Winner Voting with Approval Preferences". arXiv preprint arXiv:2007.01795. 2020. https://arxiv.org/abs/2007.01795

abcvoting's People

Contributors

martinlackner avatar lumbric avatar benjaminkrenn avatar florian-lackner avatar stefanschlomoforster avatar dominikpeters avatar jkompa avatar pbatko avatar elvic96 avatar

Forkers

jkompa

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.