Skip to content

Commit

Permalink
Add 2D distributions image to examples/README.md
Browse files Browse the repository at this point in the history
Be more explicit in 2D plot name, use "Gaussian" instead of "normal".

Commit pickle file so it can be run immediately.
  • Loading branch information
endolith committed Aug 10, 2024
1 parent 56f06fb commit 013621c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
Binary file not shown.
6 changes: 6 additions & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,12 @@ Source: [distributions_by_n_cands.py](distributions_by_n_cands.py)

Source: [distributions_by_dispersion.py](distributions_by_dispersion.py)

### By method, in two-dimensional space

![](./results/1M_2D_elections,_1k_voters,_9_candidates,_both_Gaussian,_0.5_relative_dispersion.png)

Source: [distributions_by_method_2D.py](distributions_by_method_2D.py)

## Tomlinson 2023

Kiran Tomlinson, Johan Ugander, Jon Kleinberg (2023) [Moderation in instant runoff voting](https://arxiv.org/abs/2303.09734)
Expand Down
5 changes: 3 additions & 2 deletions examples/distributions_by_method_2D.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,9 @@ def simulate_batch(n_cands):
title = f'{human_format(n_elections)} 2D elections, '
title += f'{human_format(n_voters)} voters, '
title += f'{human_format(n_cands)} candidates'
title += f', both {cand_dist}'
title += f', {disp:.1f} disp'
if cand_dist == 'normal':
title += f', both Gaussian'
title += f', {disp:.1f} relative dispersion'

# Load from .pkl file if it exists
pkl_filename = title + '.pkl'
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 013621c

Please sign in to comment.