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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"data_handle": "<data_handle>"
},
"name": "split_data"
}
}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). |