PopulationGaussianWell¶
-
class
svvamp.
PopulationGaussianWell
(V, C, sigma, shift=None)[source]¶ Population with ‘Gaussian well’ model.
Parameters: - V – Integer. Number of voters.
- C – Integer. Number of candidates.
- sigma – 1d array of numbers. The variance of the gaussian law along each dimension.
- shift – 1d array of numbers, same dimension as
sigma
. Shift for the mean position of the candidates.
Returns: A
Population
object.Let us note
n_dim
the number of elements insigma
. For voterv
(resp. each candidatec
) and each axisi
inrange(n_dim)
, a positionx_i[v]
(resp.y_i[c]
) is independently drawn according to a normal law of mean 0 and variancesigma[i]
. Ifshift
is used, the distribution of positions for candidates is displaced by this vector.Let
d[v, c]
denote the Euclidean distance between voterv
‘s positionx[v]
and candidatec
‘s positiony[c]
. Thenpreferences_ut[v, c] = A - d[v, c]
, whereA
is such that the average utility is 0 over the whole population.If
ndim = 1
, the population is single-peaked.