BestResponse

class poisson_approval.BestResponse(tau, ranking)[source]

Best response for a given ordinal type of voter (abstract class).

The main objective of this class is to compute threshold_utility. The subclasses implement the best response in a specific voting rule.

Parameters:
  • tau (TauVector) – A tau-vector.
  • ranking (str) – Voter’s ranking, e.g. 'abc'.
i, j, k

The first (resp. second, third) candidate in ranking. E.g. a.

Type:str
ij, ik, jk

The ballots with two candidates. E.g. ab.

Type:str
tau_i, tau_j, tau_k, tau_ij, tau_ik, tau_jk

The values of the tau-vector.

Type:Number
ballot

This can be a valid ballot or 'utility-dependent'.

Type:str
duo_ij

The duo ij.

Type:EventDuo
duo_ik

The duo ik.

Type:EventDuo
duo_ji

The duo ji.

Type:EventDuo
duo_jk

The duo jk.

Type:EventDuo
duo_ki

The duo ki.

Type:EventDuo
duo_kj

The duo kj.

Type:EventDuo
justification

How the program computed the utility threshold.

Type:str
pivot_ij_easy_or_tight

True if the pivot ij is easy or tight, False if it is difficult.

Type:bool
pivot_ik_easy_or_tight

True if the pivot ik is easy or tight, False if it is difficult.

Type:bool
pivot_ji_easy_or_tight

True if the pivot ji is easy or tight, False if it is difficult.

Type:bool
pivot_jk_easy_or_tight

True if the pivot jk is easy or tight, False if it is difficult.

Type:bool
pivot_ki_easy_or_tight

True if the pivot ki is easy or tight, False if it is difficult.

Type:bool
pivot_kj_easy_or_tight

True if the pivot kj is easy or tight, False if it is difficult.

Type:bool
pivot_strict_ij

The strict pivot ij.

Type:EventPivotStrict
pivot_strict_ik

The strict pivot ik.

Type:EventPivotStrict
pivot_strict_ji

The strict pivot ji.

Type:EventPivotStrict
pivot_strict_jk

The strict pivot jk.

Type:EventPivotStrict
pivot_strict_ki

The strict pivot ki.

Type:EventPivotStrict
pivot_strict_kj

The strict pivot kj.

Type:EventPivotStrict
pivot_tij

The personalized pivot between candidates i and j. This is just another notation for pivot_tij_ijk.

Type:EventPivotTij
pivot_tij_ijk

The first personalized pivot for voters ijk.

Type:EventPivotTij
pivot_tij_ikj

The first personalized pivot for voters ikj.

Type:EventPivotTij
pivot_tij_jik

The first personalized pivot for voters jik.

Type:EventPivotTij
pivot_tij_jki

The first personalized pivot for voters jki.

Type:EventPivotTij
pivot_tij_kij

The first personalized pivot for voters kij.

Type:EventPivotTij
pivot_tij_kji

The first personalized pivot for voters kji.

Type:EventPivotTij
pivot_tjk

The personalized pivot between candidates j and k. This is just another notation for pivot_tjk_ijk.

Type:EventPivotTjk
pivot_tjk_ijk

The second personalized pivot for voters ijk.

Type:EventPivotTjk
pivot_tjk_ikj

The second personalized pivot for voters ikj.

Type:EventPivotTjk
pivot_tjk_jik

The second personalized pivot for voters jik.

Type:EventPivotTjk
pivot_tjk_jki

The second personalized pivot for voters jki.

Type:EventPivotTjk
pivot_tjk_kij

The second personalized pivot for voters kij.

Type:EventPivotTjk
pivot_tjk_kji

The second personalized pivot for voters kji.

Type:EventPivotTjk
pivot_weak_ij

The weak pivot ij.

Type:EventPivotWeak
pivot_weak_ik

The weak pivot ik.

Type:EventPivotWeak
pivot_weak_ji

The weak pivot ji.

Type:EventPivotWeak
pivot_weak_jk

The weak pivot jk.

Type:EventPivotWeak
pivot_weak_ki

The weak pivot ki.

Type:EventPivotWeak
pivot_weak_kj

The weak pivot kj.

Type:EventPivotWeak
results

Cf. threshold_utility and justification.

Type:tuple (threshold_utility, justification)
threshold_utility

The threshold value of the utility for the second candidate (where the optimal ballot changes).

Type:Number
trio

The 3-candidate tie.

Type:EventTrio
trio_1t

The first personalized trio. This is just another notation for trio_1t_i.

Type:EventTrio1t
trio_1t_i

The first personalized trio (where candidate i has one vote less).

Type:EventTrio1t
trio_1t_j

The first personalized trio (where candidate j has one vote less).

Type:EventTrio1t
trio_1t_k

The first personalized trio (where candidate k has one vote less).

Type:EventTrio1t
trio_2t

The second personalized trio. This is just another notation for trio_2t_ij.

Type:EventTrio1t
trio_2t_ij

The second personalized trio (where candidates i and j have one vote less).

Type:EventTrio2t
trio_2t_ik

The second personalized trio (where candidates i and k have one vote less).

Type:EventTrio2t
trio_2t_ji

The second personalized trio (where candidates j and i have one vote less).

Type:EventTrio2t
trio_2t_jk

The second personalized trio (where candidates j and k have one vote less).

Type:EventTrio2t
trio_2t_ki

The second personalized trio (where candidates k and i have one vote less).

Type:EventTrio2t
trio_2t_kj

The second personalized trio (where candidates k and j have one vote less).

Type:EventTrio2t