DropEventByTime#

class tonic.transforms.DropEventByTime(duration_ratio: Union[float, Tuple[float, float]] = 0.2)[source]#

Drops events in a certain time interval with a length proportional to a specified ratio of the original length.

Parameters:

duration_ratio (Union[float, Tuple[float]], optional) – the length of the dropped time interval, expressed in a ratio of the original sequence duration. - If a float, the value is used to calculate the interval length - If a tuple of 2 floats, the ratio is randomly chosen in [min, max) Defaults to 0.2.

Example

>>> transform = tonic.transforms.DropEventByTime(duration_ratio=(0.1, 0.8))