DropEvent#

class tonic.transforms.DropEvent(p: Union[float, Tuple[float, float]])[source]#

Randomly drops events with probability p. If random_p is selected, the drop probability is randomized between 0 and p.

Parameters:

p (float or tuple of floats) – Probability of dropping events. Can be a tuple of floats (p_min, p_max), so that p is sampled from the range.

Example

>>> transform1 = tonic.transforms.DropEvent(p=0.2)
>>> transform2 = tonic.transforms.DropEvent(p=(0, 0.5))