Training Transforms¶
Transforms and augmentations following the __call__(xb, yb) -> (xb, yb) protocol.
prediction_concat ¶
Concatenate y onto x for autoregressive prediction, shortening both by t_offset.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
t_offset
|
int
|
number of steps the output is shifted in the past |
1
|
Source code in tsfast/training/transforms.py
noise ¶
Add normal-distributed noise with per-signal mean and std to the input.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
std
|
float | Tensor
|
standard deviation of the noise per signal (scalar or vector) |
0.1
|
mean
|
float | Tensor
|
mean of the noise per signal (scalar or vector) |
0.0
|
p
|
float
|
probability of applying the augmentation |
1.0
|
Source code in tsfast/training/transforms.py
noise_varying ¶
Add noise with a randomly sampled standard deviation per application.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
std_std
|
float
|
standard deviation of the noise std distribution |
0.1
|
p
|
float
|
probability of applying the augmentation |
1.0
|
Source code in tsfast/training/transforms.py
noise_grouped ¶
Add noise with per-group randomly sampled standard deviations.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
std_std
|
standard deviation of the noise std distribution per group |
required | |
std_idx
|
index mapping each signal to its noise group |
required | |
p
|
float
|
probability of applying the augmentation |
1.0
|
Source code in tsfast/training/transforms.py
bias ¶
Add a constant normal-distributed offset per signal per sample to the input.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
std
|
float | Tensor
|
standard deviation of the bias per signal (scalar or vector) |
0.1
|
mean
|
float | Tensor
|
mean of the bias per signal (scalar or vector) |
0.0
|
p
|
float
|
probability of applying the augmentation |
1.0
|
Source code in tsfast/training/transforms.py
vary_seq_len ¶
truncate_sequence ¶
Progressively truncate sequence length during training using a scheduler.
Stateful: call setup(trainer) before training to access trainer.pct_train.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
truncate_length
|
int
|
maximum number of time steps to truncate |
50
|
scheduler
|
Callable
|
scheduling function controlling truncation over training |
sched_ramp
|