Skip to content

caveat.data.augment

DiscreteJitter(step_size, jitter=0) #

Bases: ScheduleAugment

Source code in caveat/data/augment.py
def __init__(self, step_size: int, jitter: int = 0):

    self.step_size = step_size
    self.jitter = jitter

jitter = jitter instance-attribute #

step_size = step_size instance-attribute #

DiscreteSingleJitter(step_size, jitter=0) #

Bases: ScheduleAugment

Source code in caveat/data/augment.py
def __init__(self, step_size: int, jitter: int = 0):

    self.step_size = step_size
    self.jitter = jitter

jitter = jitter instance-attribute #

step_size = step_size instance-attribute #

ScheduleAugment() #

Source code in caveat/data/augment.py
def __init__(self) -> None:
    raise NotImplementedError

SequenceJitter(jitter=0.1) #

Bases: ScheduleAugment

Augment a sequence by adding jitter to the duration of each activity. Note that jitter defines the maximum delay or advance of the activity duration as a proportion. But note that during normalisation of the total plan duration this can be exceeded.

PARAMETER DESCRIPTION
jitter

activity duration maximum delta. Defaults to 0.1.

TYPE: float DEFAULT: 0.1

Source code in caveat/data/augment.py
def __init__(self, jitter: float = 0.1):
    """Augment a sequence by adding jitter to the duration of each activity.
    Note that jitter defines the maximum delay or advance of the activity duration
    as a proportion. But note that during normalisation of the total plan duration
    this can be exceeded.

    Args:
        jitter (float, optional): activity duration maximum delta. Defaults to 0.1.
    """
    self.jitter = jitter

jitter = jitter instance-attribute #