windowing: Windowing

View source: R/utils.R

windowingR Documentation

Windowing

Description

Create a training/test set with sliding windows. Return a list of indices for training and test set

Usage

windowing(
  x = NULL,
  k = NULL,
  s = 1,
  method = c("window", "anchored"),
  overlapping = TRUE
)

Arguments

x

number of elements to split as scalar

k

windows size (training)

s

sliding step (test)

method

"window" (default) or "anchored" (no old data forgetting)

overlapping

FALSE, skip training+test windows (e.g. training 1:12/test 13:15,training 16:27/test 28:30,...)

Value

list

Examples

windowing(60,12,3)
windowing(60,12,3,"anchored")
windowing(60,12,3,overlapping=FALSE)


maxto/qapi documentation built on Feb. 1, 2024, 9:42 a.m.