Test-driven Python library to help deliberate using Majority Judgment.
The goal is to be scalable, reliable, fast and extensible. We therefore use a score-based algorithm whatsoever.
Simply use pip
as in:
pip install git+https://github.com/MieuxVoter/majority-judgment-library-python
Collect the votes for each Candidate and provide them in the function majority_judgment
as is:
>>> from majority_judgment import majority_judgment
>>> data = {
... 'Pizza': [!, 0, 3, 0, 2, 0, 3, 1, 2, 3],
... 'Chips': [0, 1, 0, 2, 1, 2, 2, 3, 2, 3],
... 'Pasta': [0, 1, 0, 1, 2, 1, 3, 2, 3, 3],
... 'Bread': [0, 1, 2, 1, 1, 2, 1, 2, 2, 3],
... }
>>> majority_judgment(data, reverse=False)
{'Chips': 0, 'Pasta': 1, 'Pizza': 2, 'Bread': 3}
MIT → Do whatever you want except complain.
Majority Judgment itself is part of the Commons, obviously.
We'd love to invest more energy in Majority Judgment development.
Please consider funding us, every bit helps : https://www.paypal.com/donate/?hosted_button_id=QD6U4D323WV4S