Title: | Efficient Voting Methods for Committee Selection |
---|---|
Description: | A fast 'Rcpp'-based implementation of polynomially-computable voting theory methods for committee ranking and scoring. The package includes methods such as Approval Voting (AV), Satisfaction Approval Voting (SAV), sequential Proportional Approval Voting (PAV), and sequential Phragmen's Rule. Weighted variants of these methods are also provided, allowing for differential voter influence. |
Authors: | John Zobolas [cre, aut] , Anne-Marie George [ctb] |
Maintainer: | John Zobolas <[email protected]> |
License: | LGPL (>= 3) |
Version: | 0.0.1 |
Built: | 2024-11-27 23:20:43 UTC |
Source: | https://github.com/bblodfon/fastvoter |
Calculates a ranking of candidates based on voters' preferences. Approval-Based Committe (ABC) rules are based on Lackner et al. (2023).
rank_candidates( voters, candidates, weights = NULL, committee_size = NULL, method = "av", borda_score = TRUE, shuffle_candidates = TRUE )
rank_candidates( voters, candidates, weights = NULL, committee_size = NULL, method = "av", borda_score = TRUE, shuffle_candidates = TRUE )
voters |
( |
candidates |
( |
weights |
( |
committee_size |
( |
method |
( |
borda_score |
( |
shuffle_candidates |
( |
This method implements several consensus-based ranking methods, where voters express preferences for candidates. The input framework considers:
Voters: A list where each element represents the preferences (subsets of candidates) of a single voter.
Candidates: A vector of all possible candidates. This vector is shuffled before processing to enforce random tie-breaking across methods.
Weights: A numeric vector specifying the influence of each voter. Equal weights indicate all voters contribute equally; different weights can reflect varying voter importance.
The following methods are supported for ranking candidates:
"av"
: Approval Voting (AV) ranks candidates based on the number of voters approving them.
"sav"
: Satisfaction Approval Voting (SAV) ranks candidates by normalizing approval scores based on the size of each voter's approval set.
Voters who approve more candidates contribute a lesser score to the individual approved candidates.
"seq_pav"
: Sequential Proportional Approval Voting (PAV) builds a committee by iteratively maximizing a proportionality-based satisfaction score.
The PAV score is a metric that calculates the weighted sum of harmonic numbers corresponding to the number of elected candidates supported by each voter, reflecting the overall satisfaction of voters in a committee selection process.
"seq_phragmen"
: Sequential Phragmen's Rule selects candidates to balance voter representation by distributing "loads" evenly.
The rule iteratively selects the candidate that results in the smallest increase in voter load.
This approach is suitable for scenarios where a balanced representation is desired, as it seeks to evenly distribute the "burden" of representation among all voters.
All methods have weighted versions which consider voter weights.
To allow for method-agnostic comparisons of rankings, we calculate the borda scores for each method as:
where is the total number of candidates, and
is the candidate's rank.
A data.table::data.table with columns:
"candidate"
: Candidate names.
"score"
: Scores assigned to each candidate based on the selected method (if applicable).
"norm_score"
: Normalized scores (if applicable), scaled to the range , which can be loosely interpreted as selection probabilities (see Meinshausen et al. (2010) for an example in Machine Learning research where the goal is to perform stable feature selection).
"borda_score"
: Borda scores for method-agnostic comparison, ranging in , where the top candidate receives a score of 1 and the lowest-ranked candidate receives a score of 0.
Candidates are ordered by decreasing "score"
, or by "borda_score"
if the method returns only rankings.
Meinshausen, Nicolai, Buhlmann, Peter (2010). “Stability Selection.” Journal of the Royal Statistical Society Series B: Statistical Methodology, 72(4), 417–473. ISSN 1369-7412, doi:10.1111/J.1467-9868.2010.00740.X, 0809.2932.
Lackner, Martin, Skowron, Piotr (2023). Multi-Winner Voting with Approval Preferences. Springer Nature. ISBN 9783031090165, doi:10.1007/978-3-031-09016-5, 2007.01795. “
# 5 candidates candidates = paste0("V", seq_len(5)) # 4 voters voters = list( c("V3", "V1", "V4"), c("V3", "V1"), c("V3", "V2"), c("V2", "V4") ) # voter weights weights = c(1.1, 2.5, 0.8, 0.9) # Approval voting (all voters equal) rank_candidates(voters, candidates) # Approval voting (voters unequal) rank_candidates(voters, candidates, weights) # Satisfaction Approval voting (voters unequal, no borda score) rank_candidates(voters, candidates, weights, method = "sav", borda_score = FALSE) # Sequential Proportional Approval voting (voters equal, no borda score) rank_candidates(voters, candidates, method = "seq_pav", borda_score = FALSE) # Sequential Phragmen's Rule (voters equal) rank_candidates(voters, candidates, method = "seq_phragmen", borda_score = FALSE)
# 5 candidates candidates = paste0("V", seq_len(5)) # 4 voters voters = list( c("V3", "V1", "V4"), c("V3", "V1"), c("V3", "V2"), c("V2", "V4") ) # voter weights weights = c(1.1, 2.5, 0.8, 0.9) # Approval voting (all voters equal) rank_candidates(voters, candidates) # Approval voting (voters unequal) rank_candidates(voters, candidates, weights) # Satisfaction Approval voting (voters unequal, no borda score) rank_candidates(voters, candidates, weights, method = "sav", borda_score = FALSE) # Sequential Proportional Approval voting (voters equal, no borda score) rank_candidates(voters, candidates, method = "seq_pav", borda_score = FALSE) # Sequential Phragmen's Rule (voters equal) rank_candidates(voters, candidates, method = "seq_phragmen", borda_score = FALSE)