Zansa › Answers › Forecasting and data science
How should I split data into training and test sets for forecasting?
Split by time: train on the earlier period and test on the later one, never shuffling. Keep the test period as long as your forecast horizon and ideally covering a full season. For stronger evidence, repeat with several cutoff dates rather than relying on a single split.
For example, train on January 2022 to December 2024 and test on January to June 2025. Then roll the cutoff forward and repeat.
Some teams use three parts: training, validation for choosing settings, and a final untouched test set. Do not tune against the final test set repeatedly, or it stops being an honest check.
Keep the gap between training and test realistic: if you forecast eight weeks ahead in practice, test eight weeks ahead.
Want this applied to your business? Zansa builds dashboards and forecasts for small and mid-sized companies worldwide. Start with a free intro call.
Book a call