windowing | R Documentation |
Create a training/test set with sliding windows. Return a list of indices for training and test set
windowing(
x = NULL,
k = NULL,
s = 1,
method = c("window", "anchored"),
overlapping = TRUE
)
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,...) |
list
windowing(60,12,3)
windowing(60,12,3,"anchored")
windowing(60,12,3,overlapping=FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.