ts_aug_stretch: Augmentation by Stretch

View source: R/ts_aug_stretch.R

ts_aug_stretchR Documentation

Augmentation by Stretch

Description

Increase within-window deviation magnitude by a scaling factor to produce higher-variance variants.

Usage

ts_aug_stretch(scale_factor = 1.2)

Arguments

scale_factor

Numeric factor used to scale deviations.

Value

A ts_aug_stretch object.

References

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

Examples

# 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)

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