Random distributions

class schedy.random.LogUniform(low, high)[source]

LogUniform distribution. Values are sampled betweend low and high, such that log(value) is uniformly distributed between log(low) and log(high).

Parameters:
  • low (float) – Minimal value (inclusive).
  • high (float) – Maximum value (exclusive).
class schedy.random.Uniform(low, high)[source]

Uniform distribution. Values will be uniformly distributed in the interval [low, high).

Parameters:
  • low (float) – Minimal value (inclusive).
  • high (float) – Maximum value (exclusive).
class schedy.random.Choice(values, weights=None)[source]

Choice distribution. Values will be picked randomly in a set of values. You can optionally provide weights for these values, to make some of them more likely to be suggested by Schedy than others.

Parameters:
  • values (list) – Possible values that can be picked. They can be numbers, strings, booleans, strings, lists or dictionaries, and you can mix those.
  • weights (list) – Weight associated with each value. If provided, the length of weights must be the same as that of values.
class schedy.random.Normal(mean, std)[source]

Normal distribution.

Parameters:
  • mean (float) – Desired mean of the distribution.
  • std (float) – Desired standard deviation of the distribution.
class schedy.random.Constant(value)[source]

“Constant” distribution. Will always yield the same value.

Parameters:value – The value of the samples that will be returned by this distribution. Can be a number, string, boolean, string, list or dictionary.