Baldwin¶
-
class
svvamp.Baldwin(population, **kwargs)[source]¶ Baldwin method.
Inherits functions and optional parameters from superclasses
ElectionResultandElection.Example: >>> import svvamp >>> pop = svvamp.PopulationSpheroid(V=100, C=5) >>> election = svvamp.Baldwin(pop)
Each voter provides a strict order of preference. The candidate with lowest Borda score is eliminated. Then the new Borda scores are computed. Etc. Ties are broken in favor of lower-index candidates: in case of a tie, the candidate with highest index is eliminated.
Since a Condorcet winner has always a Borda score higher than average, Baldwin method meets the Condorcet criterion.
CM(): Non-polynomial or non-exact algorithms from superclassElection.ICM(): Exact in polynomial time.IM(): Deciding IM is NP-complete. Non-polynomial or non-exact algorithms from superclassElection.not_IIA(): Exact in polynomial time.TM(): Exact in polynomial time.UM(): Non-polynomial or non-exact algorithms from superclassElection.References:
‘Complexity of and algorithms for the manipulation of Borda, Nanson’s and Baldwin’s voting rules’, Jessica Davies, George Katsirelos, Nina Narodytska, Toby Walsh and Lirong Xia, 2014.-
candidates_by_scores_best_to_worst¶ 1d array of integers.
candidates_by_scores_best_to_worst[-r]is the candidate eliminated at elimination roundr.By definition / convention,
candidates_by_scores_best_to_worst[0]=w.
-
scores¶ 2d array of integers.
scores[r, c]is the Borda score of candidatecat elimination roundr.By convention, if candidate
cdoes not participate to roundr, thenscores[r, c] = numpy.inf.
-
w¶ Integer (winning candidate).
-