module documentation

Noisifier class and helper code.

Class Noisifier noise wrapper for an observed problem.
Function rand return a uniform random value seeded with x[:2] and i
Function randc return a Cauchy random value seeded with x[:2] and i.
Function randn return a normal random value seeded with x[:2] and i
Variable parameters_file default file name where to save current parameters of Noisifier
Variable save_parameters flag whether Noisifier.__init__ saves noise parameters in file
Function _cauchy Samples N standard Cauchy distributed numbers being the same for a given seed
Function _gauss Samples N standard normally distributed numbers being the same for a given seed
Function _read_params read parameters from a json file and return a parameters dict
Function _seed return a scalar seed using the first two entries of vector x
Function _unif Generates N uniform numbers with starting seed inseed.
Variable _frozen_noise Undocumented
Variable _seed_weights Undocumented
Variable _seeds Undocumented
def rand(x, i=0):

return a uniform random value seeded with x[:2] and i

def randc(x, i=0):

return a Cauchy random value seeded with x[:2] and i.

We observe that median(|Z|) == 1 and p(pi x Z / 2 > a) == 1/a.

def randn(x, i=0):

return a normal random value seeded with x[:2] and i

parameters_file: str =

default file name where to save current parameters of Noisifier

Value
'noiser_parameters.json'
save_parameters: bool =

flag whether Noisifier.__init__ saves noise parameters in file

Value
False
def _cauchy(N, seed):

Samples N standard Cauchy distributed numbers being the same for a given seed

def _gauss(N, seed):

Samples N standard normally distributed numbers being the same for a given seed

def _read_params(filename=None, warn_errors=(FileNotFoundError), ignore_errors=()):

read parameters from a json file and return a parameters dict

def _seed(x, i=0):

return a scalar seed using the first two entries of vector x

def _unif(N, inseed):

Generates N uniform numbers with starting seed inseed.

This is copy-paste from the bbobbenchmarks Python implementation with minor adaptation.

_frozen_noise: bool =

Undocumented

Value
True
_seed_weights: list[float] =

Undocumented

Value
[1.23468, 2.34579]
_seeds =

Undocumented

Value
collections.deque(maxlen=99)