split_data
Split a time series data handle into temporal train and test sets using a test fraction or forecast horizon. Returns separate handles and metadata for further analysis.
Instructions
Split a time series data handle into temporal train and test sets, registering both halves as new data handles. Provide exactly one of test_size (fraction in (0, 1)) or fh (forecast horizon). fh may be an integer (hold out that many final steps) or a list of relative horizon indices (hold out max(fh) final steps). Returns train_handle, test_handle, cutoff timestamp, train_size, and n_test.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fh | No | Forecast horizon for the test window. Integer: hold out that many final time steps. List of ints: hold out max(fh) final steps (e.g. fh=[1,5,10] reserves 10 steps). Mutually exclusive with test_size. | |
| test_size | No | Fraction of observations to hold out for the test set, exclusive range (0.0, 1.0). Mutually exclusive with fh. | |
| data_handle | Yes | Data handle ID to split (from load_data_source or transform_data). |