Pref Grade Profiles¶
Profiles of voters that each submit both a (truncated) strict weak order and an assignment of grades from a fixed set to each candidate. The ballots for a PrefGradeProfile are Rankings and Grades.
PrefGradeProfile Class¶
- class pref_voting.pref_grade_profile.PrefGradeProfile(rankings, grade_maps, grades, rcounts=None, candidates=None, cmap=None, gmap=None, grade_order=None)[source]¶
An anonymous profile in which each voter submits both a (truncated) strict weak order and an assignment of grades. See the module docstring for the design.
- Parameters:
rankings – List of rankings (each a
Rankingor a dict).grade_maps – List of grade maps (each a
Gradeor a dict).grades – List of grades.
rcounts – Number of voters for each ranking/grade pair.
candidates – List of candidates (defaults to the union appearing in the data).
cmap – candidate-name map.
gmap – grade-name map.
grade_order – grades from largest to smallest (numeric
>if None).
- display(cmap=None, style='pretty', curr_cands=None, show_grades=True, show_totals=False)[source]¶
Display the ranking table and (optionally) the grade table.