View source: R/ts_aug_shrink.R
| ts_aug_shrink | R Documentation |
Decrease within-window deviation magnitude by a scaling factor to generate lower-variance variants while preserving the mean.
ts_aug_shrink(scale_factor = 0.8)
scale_factor |
Numeric factor used to scale deviations. |
A ts_aug_shrink object.
Q. Wen et al. (2021). Time Series Data Augmentation for Deep Learning: A Survey. IJCAI Workshop on Time Series.
# Shrink augmentation reduces 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 shrink augmentation and inspect augmented windows
augment <- ts_aug_shrink()
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.