tspartition
Description
A tspartition
object partitions a set of regularly sampled, time
series data based on the specified size of the data set. Use this object to define training
and test sets for validating a time series regression model with expanding window
cross-validation, sliding window cross-validation, or holdout validation. Use the training
object
function to extract the training indices and the test
object
function to extract the test indices.
For an example that uses tspartition
for time series forecasting, see
Perform Time Series Direct Forecasting with directforecaster.
Creation
Syntax
Description
specifies options using one or more name-value arguments in addition to any of the input
argument combinations in previous syntaxes. For example, you can specify the number of
observations to exclude between the end of each training set and before the beginning of
its corresponding test set by using the c
= tspartition(___,Name=Value
)GapSize
name-value
argument.
Input Arguments
Properties
Object Functions
Examples
Version History
Introduced in R2022b