0
$\begingroup$

I need advice on how to create a train-test-split with a small data set of correlated time series to predict historical values.

My data consists of 30 different time series covering each 4000 periods, which are spatially and temporally correlated (e.g. GDP in different countries, measured daily across several years). I do not want to predict future values but compute predictions across the time series (e.g. predict GDP for a country given other countries). Based on my understanding, the best validation strategy would be leave-one-out nested cross-validation.

However, I have been asked by my supervisor also to implement a train-test-split in the most classical way (e.g. to fully put a few of the time series completely away as a test set.). How do I choose these time series? Randomization does not seem to make sense, given the small sample, and I am unsure how to do stratification in this context... Would be thankful for any advice!

$\endgroup$

1 Answer 1

0
$\begingroup$

You can use TimeSeriesSplit, which is precisely a function to perform the split of time series to train and test sets. Please note that in a time series, you cannot use a common split, as the data is fixed in time and therefore you cannot suffle it.

Or, you can use a percentage of the end of the time series as a test set. For example: Train your data on data from the first 10 months and then test on data from months 11 and 12.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.