Hello everyone,
I want to train a NARX-model for multi-step prediction of time series. The task has the following boundary conditions:
1) 100 time series of different lengths in minute resolution
2) 2 inputs, 1 target
3) All time series have the shape of an exponential decay
4) All time series were first mixed (randperm) and then distributed to the sets for training (1:70), validation (71:85) and testing (86:100).
5) The time series of the sets are transformed to cell-arrays via 'catsamples' in order to train the network with multiple time series at once.
I am not sure how to divide the data properly. I would like to train the net with all the complete time-series of the training set and the validation set by using early stopping in order to avoid overfitting. The test set is used for testing the trained net with unseen data. But when I use the built-in functions for data division, the time series are torn apart:
net.divideFcn = 'divideblock';
net.divideMode = 'sampletime';
net.divideParam.trainRatio = 0.7;
net.divideParam.valRatio = 0.15;
net.divideParam.testRatio = 0.15;
This means that the first 70% of the timesteps are put into training set, the next 15% of the timesteps are put into validation set and the last 15% of the timesteps are put into test set.
So my question is:
How can I divide the data into three sets with complete time series which are not torn apart? I illustrated my question with the following 2 pictures:
Best regards
Torsten