ts_aug_flip: Augmentation by Flip

View source: R/ts_aug_flip.R

ts_aug_flipR Documentation

Augmentation by Flip

Description

Time series augmentation by mirroring sliding-window observations around their mean to increase diversity and reduce overfitting.

Usage

ts_aug_flip()

Details

This transformation preserves the window mean while flipping the deviations, effectively generating a symmetric variant of the local pattern.

Value

A ts_aug_flip object.

References

  • Q. Wen et al. (2021). Time Series Data Augmentation for Deep Learning: A Survey. IJCAI Workshop on Time Series.

Examples

# Flip augmentation around the window mean
# 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 flip augmentation and inspect augmented windows
augment <- ts_aug_flip()
augment <- fit(augment, xw)
xa <- transform(augment, xw)
ts_head(xa)

tspredit documentation built on Feb. 11, 2026, 9:08 a.m.