split_ts function

Split a time series into training and testing sets