Diversity#

agreement_index(election) dict[source]#

Calculates the agreement index of the election.

Parameters:

election (OrdinalElection)

Returns:

‘value’: agreement index

Return type:

dict

diversity_index(election) dict[source]#

Calculates the diversity index of the election.

Parameters:

election (OrdinalElection)

Returns:

‘value’: diversity index

Return type:

dict

polarization_index(election) dict[source]#

Calculates the polarization index of the election.

Parameters:

election (OrdinalElection)

Returns:

‘value’: polarization index

Return type:

dict

remove_diag(mtrx)[source]#

Return: Input frequency_matrix with diagonal removed (shape[1] - 1)

swap_distance_between_potes(pote_1: list, pote_2: list) int[source]#

Return: Swap distance between two potes