elektronn3.data.transforms.random module

Random number generators for random augmentation parametrization

class elektronn3.data.transforms.random.HalfNormal(sigma=1, shape=(), bounds=None)[source]

Bases: elektronn3.data.transforms.random.RandomSampler

Half-normal distribution sampler.

See https://en.wikipedia.org/wiki/Half-normal_distribution. Note that all sampled values are positive, regardless of the parameters.

class elektronn3.data.transforms.random.Normal(mean=0, sigma=1, shape=(), bounds=None)[source]

Bases: elektronn3.data.transforms.random.RandomSampler

Normal distribution sampler.

class elektronn3.data.transforms.random.RandInt(low=0, high=2, shape=())[source]

Bases: elektronn3.data.transforms.random.RandomSampler

Discrete uniform distribution sampler

Outputs random integers in a defined range (low, high) with equal probability.

By default (low=0, high=2), it generates binary values (0 or 1).

class elektronn3.data.transforms.random.RandomSampler(rv, shape=(), bounds=None)[source]

Bases: object

Samples random variables from a scipy.stats distribution.