mggg / VoteKit

A Swiss Army Knife for computational social choice research
https://votekit.readthedocs.io/en/latest/
MIT License
10 stars 12 forks source link

AC and CS models #104

Closed cdonnay closed 9 months ago

cdonnay commented 10 months ago

Adding a notebook for the Alternating Crossover and Cambridge Sampler. Code changes include:

  1. The AC model was not generating ballots correctly. As an example, in the old code, if a voter was a bloc voter, it just deterministically ranked the bloc candidates in front of the non-bloc candidates. It now uses the PL model to rank the bloc candidates within themselves.
  2. I adapted the CS model to handle bloc names that differ from the historical Cambridge data.
  3. I put in a print statement when printing PreferenceProfiles to let users know if it's been truncated.
  4. In both the AC and CS model I implement Huntington-Hill to determine the number of ballots to generate.

@jamesturk @drdeford @jgibson517 @jennjwang @ziglaser

cdonnay commented 9 months ago

Thanks for the comments, @jgibson517 ! I made the changes and fixed the test functions as well.