ts_aug_shrink: Augmentation by Shrink

View source: R/ts_aug_shrink.R

ts_aug_shrinkR Documentation

Augmentation by Shrink

Description

Decrease within-window deviation magnitude by a scaling factor to generate lower-variance variants while preserving the mean.

Usage

ts_aug_shrink(scale_factor = 0.8)

Arguments

scale_factor

Numeric factor used to scale deviations.

Value

A ts_aug_shrink object.

References

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

Examples

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

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