> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/sdgm/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/sdgm/_mcp/server.

# How do I split data and backtest a model?

> Configure training splits and evaluate historical predictions on held-out data

## Configure the Splits

Set `TrainingTableGenerationPlan(split=...)` and pass it to `query.generate_training_table(snapshot, plan=...)`. Split constructors are strings, such as `"RandomSplit([0.8, 0.1, 0.1], seed=42)"`.

Choose a split that matches the task and available timestamps. For temporal backtesting, use chronological windows such as `TimeRangeSplit` or `DateOffsetSplit`. Features must be available at each historical prediction time, with enough subsequent data to calculate labels.

For supplied training rows, set `TrainingTableSpec(split_col="SPLIT")` and use `0` for training, `1` for validation, and `2` for test. Check the resulting row counts before fitting.

See [Choose Split Assignments](/kumo-engine/user-code-guide/train-a-model/predictive-queries#choose-split-assignments) and [Custom Training Tables](/kumo-engine/user-code-guide/train-a-model/predictive-queries#use-custom-training-tables) for configuration.

## Evaluate Historical Predictions

Inspect the fit's test metrics and [saved holdout predictions](/kumo-engine/user-code-guide/train-a-model/training-diagnostics#read-holdout-predictions). Compare models using the same population, prediction times, labels, and metric. Keep the data used to choose model settings separate from the final test set.