- class svvamp.GeneratorProfileNoise(base_profile, relative_noise=0.0, absolute_noise=0.0, sort_voters=False)[source]#
Profile generator adding noise to a given profile
- Parameters:
Notes
We compute
total_noise = absolute_noise + relative_noise * amplitude
, whereamplitude
is the difference between the lowest and the highest utility. Then to eachpreferences_ut[v, c]
, a random noise is added which is drawn independently and uniformly in the interval[- total_noise, total_noise]
.Examples
>>> generator = GeneratorProfileNoise(base_profile=Profile(preferences_ut=[[5, 1, 2], [4, 10, 1]]), ... absolute_noise=.1) >>> profile = generator() >>> profile.preferences_rk.shape (2, 3)