View source: R/ts_aug_stretch.R
| ts_aug_stretch | R Documentation |
Increase within-window deviation magnitude by a scaling factor to produce higher-variance variants.
ts_aug_stretch(scale_factor = 1.2)
scale_factor |
Numeric factor used to scale deviations. |
A ts_aug_stretch object.
Q. Wen et al. (2021). Time Series Data Augmentation for Deep Learning: A Survey. IJCAI Workshop on Time Series.
# Stretch augmentation increases within-window deviations
# Load package and example dataset
library(daltoolbox)
data(tsd)
# Convert to sliding windows and preview
xw <- ts_data(tsd$y, 10)
ts_head(xw)
# Apply stretch augmentation and inspect augmented windows
augment <- ts_aug_stretch()
augment <- fit(augment, xw)
xa <- transform(augment, xw)
ts_head(xa)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.