Time Delay Neural Network: How to separate measurements in dynamic data for the use either in the training or the test data?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Hi, I'm training a Time Delay Neural Network. My data consists of 140 measurements and I use 5 Inputs and 2 Outputs for the neural network. As my longest measurement consists of 2791 samples, the preprocessed dynamic target data cell looks like this: 1x2791 cell containing 2x140 matrixes. (I prepared the data according to these tutorials: https://de.mathworks.com/help/nnet/ug/understanding-neural-network-toolbox-data-structures.html and https://de.mathworks.com/help/nnet/ug/multiple-sequences-with-dynamic-neural-networks.html).
If I use divideblock, divideind, divideint or dividerand I can only pick samples out of the measurements in different ways. This results in a trainMask like:
{[1 1 1 ...; 1 1 1 ...][1 1 1 ...; 1 1 1]...[0 0 0 ... ; 0 0 0]}
However, the trainMask that I need should look this way:
{[1 1 0 ...; 1 1 0 ...][1 1 0 ...; 1 1 0]...[1 1 0 ... ; 1 1 0]}
I want the measurements to be either in the test data or in the training data. How can this be done?
The reason, why I do not want to cut the measurements and put the first part in the training data and the second part in the test data: during one measurement, only one input parameter is changed and the other 4 input parameters keep their value. If the net is trained with the first part of the measurement and is then tested with the second part of the same measurement, the test data will not be really new to the network. If I train the network like that, the mse is good but the performance on truely new data (all 5 input parameters differ) is bad. I already tried to seperate the measurements for the training of a static network and it solved the problem. However, I do not know how to accomplish this for the dynamic data structure.
Thank you for your help.
0 comentarios
Respuestas (2)
Mukul Rao
el 18 de Jul. de 2017
Hi,
I am not sure I understand your question correctly.
If the training set looked like:
{ (a1a2...a140) (b1b2b3...b140) (c1c2...c140) .... }
cell array of matrices, where a1,a2 etc represented columns of the first matrix and so on. Given this structure, you would like the columns for the training, validation and test subsets to not be confined to samples associated with an entire timestamp worth of data. Meaning the test set could include combinations like (a1a4...a140c1c3..). Is this correct?
Greg Heath
el 24 de Jul. de 2017
Your explanation is too confusing.
1. Timeseries analysis contains one basic assumption:
Every contiguous subset of the timeseries has the same approximate summary statistics of mean, standard deviation and correlation coefficients.
2. If you use DIVIDEBLOCK, you do not have to worry about causality or training with nontraining data. Using the default 0.7/0.15/0.15 ratios, the 2nd (validation) and third (testing) blocks each contain Ntst = Nval = floor(0.15*N) points of NONTRAINING DATA. They are not used for weight estimation.
However, the val block will stop training if it's error rate increases continually for 6 epochs. Therefore, although it is not part of the training set, it can be considered a part of the design subset. i.e.,
data = training + nontraining
nontraining = validation + testing
data = design + nondesign
nondesign = testing
Since the val subset is not directly involved in weight estimation, it's slightly biased error rate is not a bad estimate of net performance on all nondesign data.
Finally, the test subset yields a completely unbiased estimate of net performance.
Unfortunately, many timeseries do not have stationary summary statistics and multiple nets are required to model the series over it's entire length.
Again, the validation subset performance is the best indicator that the assumption of stationarity is becoming invalid.
Therefore, use divideblock and don't worry unless plots or other evidence show that the series is not approximately stationary.
Hope this helps.
*Thank you for formally accepting my answer.
Greg
0 comentarios
Ver también
Categorías
Más información sobre Modeling and Prediction with NARX and Time-Delay Networks en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!