ApprovalElection#
- class ApprovalElection(experiment_id=None, election_id=None, culture_id=None, num_candidates=None, fast_import=False, params=None, **kwargs)[source]#
Approval Election class.
- compute_distances(object_type: str | None = None, distance_id: str = 'hamming') ndarray[source]#
Computes distances between the votes or candidates.
- compute_reverse_approvals() None[source]#
Computes reverse approvals: for each candidate, the set of voters who approve them.
- get_reverse_approvals() List[Set[int]][source]#
Returns the reverse approvals, computing them if necessary.
- prepare_instance(is_exported: bool = False, is_aggregated: bool = True) None[source]#
Prepares all the instances within the experiment.
- set_microscope(radius: float | None = None, alpha: float = 0.1, s=30, object_type: str | None = None, double_gradient: bool = False, color: str = 'blue', marker: str = 'o', title_size=20, annotate: bool = False) Microscope[source]#
Print a map of the election (i.e., microscope) using matplotlib’s OO API.