Expand description
Contains FairElection plugin models, which rank entities using a fair weight, where each entity’s weight is derived from a list of contributors and their individual contributions.
In this model:
- Each entity is represented as
(entity, fair_weight). - The
fair_weightitself is a collection of(contributor, contribution)pairs. - The plugin aggregates or evaluates these individual contributions according to its algorithm to produce a ranked output.
§Characteristics
- Requires a list of entities with their fair weights as input.
- Each fair weight preserves the granularity of individual contributions, unlike flat weights.
- Produces a sorted list of entities, taking into account the distribution and magnitude of contributions.
- Ideal for scenarios where fairness or proportional representation matters, rather than just total aggregated value.
§Example Flow
- Prepare a list of entities with their fair weights:
[(entity1, [(c1, v1), (c2, v2)]), ...]. - Pass this list to a FairElection plugin model.
- The model computes a ranking based on the individual contributions within each fair weight and outputs entities in order.
Structs§
- Balanced
Model - The BalancedFair model evaluates candidates by combining both the total backing and the average backing per backer. This approach balances candidates who have a few very large backers versus those with many smaller backers.
- MaxMin
Load Model - The Max-Min Load Fair model ranks candidates to achieve a fair distribution of influence among all backers. It selects candidates sequentially to minimize the maximum load any backer bears, ensuring no single backer is disproportionately overrepresented.
- Phragmen
Model - The Phragmen model ranks candidates based on fair distribution of
voter/backer load. Each candidate has
(Backer, Backed)pairs representing support, and the algorithm selects candidates sequentially to minimize the maximum load among all backers. - Phragmen
Model Config - Configuration for the
PhragmenModelplugin model - Threshold
Fair Model - Filters candidates whose total backing is below a configurable threshold.
- Threshold
Fair Model Config - Defines the configuration for
ThresholdFairModelelection plugin. - TopDown
Fair Model - The TopDownFair model evaluates candidates based on the aggregate support they receive from external backers.