View source: R/ts_aug_awareness.R
| ts_aug_awareness | R Documentation |
Bias the augmentation to emphasize more recent points in each window (recency awareness), increasing their contribution to the augmented sample.
ts_aug_awareness(factor = 1)
factor |
Numeric factor controlling the recency weighting. |
A ts_aug_awareness object.
Q. Wen et al. (2021). Time Series Data Augmentation for Deep Learning: A Survey. IJCAI Workshop on Time Series.
# Recency-aware augmentation over sliding windows
# Load package and example dataset
library(daltoolbox)
data(tsd)
# Convert to 10-lag sliding windows and preview
xw <- ts_data(tsd$y, 10)
ts_head(xw)
# Apply awareness augmentation (bias toward recent rows)
augment <- ts_aug_awareness()
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.