splitTrainTest: Split a time series into training and testing sets

Description Usage Arguments Author(s)

Description

Given a time series, this function splits it into two, depending on the length of numTrain. The first numTrain observations go to the training set, the remainder into the testing set, while retaining the time series attributes of both objects and correctly adjusting the start times and frequencies of both sets.

Usage

1
splitTrainTest(dat, numTrain = length(dat) - 10)

Arguments

dat

Time series

numTrain

The number of observations to keep in the training set

Author(s)

Andrew K. Smith


CombMSC documentation built on May 2, 2019, 2:32 p.m.