General Class

class embedded_voting.MultiwinnerRule(k=None)[source]

A class for multiwinner rules, in other words aggregation rules that elect a committee of candidates of size k_, given a ratings of voters with embeddings.

Parameters:k (int) – The size of the committee.
ratings

The ratings given by voters to candidates

Type:np.ndarray
embeddings

The embeddings of the voters

Type:Embeddings
k_

The size of the committee.

Type:int
set_k(k)[source]

A function to update the size k_ of the winning committee

Parameters:k (int) – The new size of the committee.
Returns:The object itself.
Return type:MultiwinnerRule
winners_

A function that returns the winners, i.e. the members of the elected committee.

Returns:The indexes of the elected candidates.
Return type:int list