Skip to main content

jitter

lq.vec.jitter(values, seed: auto, amount: 0.1, distribution: "uniform")(source)

Adds random offsets to an array of values. Note that the seed needs to be changed manually.

Parameters

values : array

The values to transform.

seed : auto | int    default: auto

The seed value for generating randomness. If set to auto, the seed will be generated by hashing the input data (note that two identical arrays will consequently be offset in the same way if the seed is auto).

amount : float    default: 0.1

The amount of jittering to apply. If vec.jitter is "uniform", this measures the bounds for the random offsets; if it is set to normal, it specifies the standard deviation.

distribution : "uniform" | "normal"    default: "uniform"

Which kind of distribution to use.