Implementation of majority judgement voting procedure
Project description
This is an implementation of the Majority Judgement voting procedure, as proposed by Michel Balinski and Rida Laraki in A theory of measuring, electing , and ranking
It takes tallies of grades provided by voters and provides a python type to wrap them which is ordered according to the majority judgement order.
For example:
x = MajorityJudgement([5, 5]) y = MajorityJudgement([3, 7]) assert x < y
The first is the grade for a candidate who has received 5 votes of 0 and 5 votes of 1. The second is a candidate with 3 votes of 0 and 7 of 1. As a result the majority judgement procedure ranks the first candidate as being worse than the second candidate.
In the event that you want more information about the details of the voting, the MajorityJudgement objects behave like the corresponding lists of grades assigned to them.
So for example:
assert list(MajorityJudgement([2,2])) == [0,1,0,1]
The MajorityJudgement object can generally be used exactly like its corresponding list of grades.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file majorityjudgement-0.1.1.tar.gz
.
File metadata
- Download URL: majorityjudgement-0.1.1.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d356ce7ea53a4b7e58cec6bc60fe4a0029120262247368c09a2048d9518410e |
|
MD5 | 37ed9b70dca68ff37475dc80c2cf2495 |
|
BLAKE2b-256 | 829424f89b9b33e207aa8c3c8c740b9e58aa4eb71c821b12b4d87be9c9fe937f |