plot_welfare_losses

poisson_approval.plot_welfare_losses(results, criterion, **kwargs)[source]

Plot the distribution (CDF) of the welfare losses, for each voting rule.

Parameters
  • results (dict) – Results of monte_carlo_fictitious_play(), with at least the setting MCS_WELFARE_LOSSES.

  • criterion (str) – 'utilitarian_welfare_losses', 'plurality_welfare_losses' or 'anti_plurality_welfare_losses'.

  • kwargs – Other keyword arguments are passed to the function step of matplotlib.

Examples

>>> meta_results = monte_carlo_fictitious_play(
...     factory=RandProfileHistogramUniform(n_bins=1),
...     n_samples=1,
...     n_max_episodes=10,
...     voting_rules=VOTING_RULES,
...     monte_carlo_settings=[MCS_WELFARE_LOSSES],
... )
>>> plot_welfare_losses(meta_results, 'utilitarian_welfare_losses')
>>> plot_welfare_losses(meta_results, 'plurality_welfare_losses')
>>> plot_welfare_losses(meta_results, 'anti_plurality_welfare_losses')