How do I split data and backtest a model?
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 and Custom Training Tables for configuration.
Evaluate Historical Predictions
Inspect the fit’s test metrics and saved 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.