votesim.models.spatial.special

Voter spatials models with variations of voter behavior of

  1. Voter Error – Voters with error in regret/distance calculation

  2. Voter Ignorance – Voters with limited memory and will only evaluate a finite number of candidates.

  3. Min/Max voters – Voters who min/max their scored ballot and do not rank all candidates

  1. Bullet voters – Voters who only vote for the top % of candidates.

Class Summary

ErrorVoters([seed, strategy, stol])

Voters who get things wrong

Module Classes

ErrorVoters

class votesim.models.spatial.special.ErrorVoters(seed=None, strategy='candidate', stol=1.0)

Voters who get things wrong

Method/Attribute Summary

ErrorVoters.add_random(numvoters[, ndim, …])

Add random normal distribution of voters

ErrorVoters.add_points(avgnum, pnum[, ndim, …])

Add a random point with several clone voters at that point

ErrorVoters.calc_ratings(candidates)

Calculate preference distances & candidate ratings for a given set of candidates

ErrorVoters.add_random(numvoters, ndim=1, error_mean=0.0, error_width=0.0, clim_mean=- 1, clim_width=2)

Add random normal distribution of voters

Parameters
  • numvoters (int) – Number of voters to generate

  • ndim (int) – Number of preference dimensions of population

  • error_mean (float) –

    Average error center of population

    • At 0, half population is 100% accurate

    • At X, the the mean voter’s accuracy is X std-deviations of voter preference,

  • error_width (float) – Error variance about the error_mean

ErrorVoters.add_points(avgnum, pnum, ndim=1, error_mean=0.0, error_width=0.0, clim_mean=- 1, clim_width=2)

Add a random point with several clone voters at that point

Parameters
  • avgnum (int) – Number of voters per unique point

  • pnum (int) – Number of unique points

  • ndim (int) – Number of dimensions

ErrorVoters.calc_ratings(candidates)

Calculate preference distances & candidate ratings for a given set of candidates