powered by
Function subsets data into training and testing datasets.
train_test_subset(data, train_perc = 0.8, test_len = NULL)
A numeric vector, time series, data.frame or matrix containg data to be subsetted.
Percentage of data observations to compose the training dataset. Ignored if test_len is given.
test_len
Required length of testing dataset. If NULL, 1-train_perc is used for computing the number of data observations in the testing dataset.
NULL
1-train_perc
A list with train and test subsets of data.
Other transformation methods: Diff(), LogT(), WaveletT(), emd(), mas(), mlm_io(), outliers_bp(), pct()
Diff()
LogT()
WaveletT()
emd()
mas()
mlm_io()
outliers_bp()
pct()
# NOT RUN { data(CATS) d <- train_test_subset(CATS[,1]) swin <- sw(CATS[,1],5) d_sw <- train_test_subset(swin) # }
Run the code above in your browser using DataLab