BestResponseApproval

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

Best response for a given ordinal type of voter in Approval voting.

The main objective of this class is to compute threshold_utility.

It also provides the string justification, indicating which sub-algorithm was used. Nowadays, possible values are 'Asymptotic method', 'Simplified asymptotic method', 'Easy vs difficult pivot', 'Difficult vs easy pivot', 'Offset method', 'Offset method with trio approximation correction'.

:param Cf. BestResponse.:

Cf. :class:`BestResponse`
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. These results use:

Type:tuple (threshold_utility, justification)
results_asymptotic_method

Results according to the asymptotic method. Cf. threshold_utility and justification. The threshold utility may be NaN, because this method is not always sufficient.

Type:tuple (threshold_utility, justification)
results_limit_pivot_theorem

Results according to the limit pivot theorem. Cf. threshold_utility and justification. If the tau-vector has two consecutive zeros, the theorem does not apply and this method returns nan, ''.

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