PopulationVMFHypersphere¶
-
class
svvamp.
PopulationVMFHypersphere
(V, C, vmf_concentration, vmf_probability=None, vmf_pole=None, stretching=1)[source]¶ Population drawn with Von Mises-Fisher distributions on the C-1-sphere
Parameters: - V – Integer. Number of voters.
- C – Integer. Number of candidates.
- stretching – Number between 0 and
numpy.inf
(both included). - vmf_concentration – 1d array. Let us note
k
its size (number of ‘groups’).vmf_concentration[i]
is the VMF concentration of groupi
. - vmf_probability – 1d array.
vmf_probability[i]
is the probability, for a voter, to be in groupi
(up to normalization). If None, then groups have equal probabilities. - vmf_pole – 2d array of size
(k, C)
.vmf_pole[i, :]
is the pole of the VMF distribution for groupi
.
Returns: A
Population
object.For each voter
c
, we draw a groupi
at random, according tovmf_probability
(normalized beforehand if necessary). Then,v
‘s utility vector is drawn according to a Von Mises-Fisher distribution of polevmf_pole[i, :]
and concentrationvmf_concentration[i]
, using Ulrich’s method modified by Wood.Once group
i
is chosen, then up to a normalization constant, the density of probability for a unit vectorx
isexp(vmf_concentration[i] vmf.pole[i, :].x)
,where vmf.pole[i, :].x
is a dot product.Then,
v
‘s utility vector is sent onto the spheroid that is the image of the sphere by a dilatation of factorstretching
along the direction [1, ..., 1]. For example, ifstretching = 1
, we stay on the unit sphere of \(\mathbb{R}^C\). Cf. working paper Durand et al. ‘Geometry on the Utility Sphere’.N.B.: if
stretching != 1
, it amounts to move the poles. For example, if the pole [1, 0, 0, 0] is given andstretching = 0
, then the actual pole will be [0.75, - 0.25, - 0.25, - 0.25] (up to a multiplicative constant).poles are normalized before being used. So, the only source of concentration for group
i
isvmf_concentration[i]
, not the norm ofvmf_pole[i]
. Ifvmf_pole
isNone
, then each pole is drawn independently and uniformly on the sphere.References:
Ulrich (1984) - Computer Generation of Distributions on the m-Sphere
Wood (1994) - Simulation of the von Mises Fisher distribution