Training Neural Network on Discontinuous Timeseries
Show older comments
I'm trying to build multilayer feedforward network for timeseries forecasting.
These are my current available data: * Dataset #1: Feb - Apr * Dataset #2: June - Sept * Dataset #3: Oct - Dec
I have successfully built a NN based on Dataset #1, however, I wish to increase the accuracy of my network prediction by expanding the training to include dataset 1-3.
Would it be safe to append all datasets into a single martix, given that they are disconnected in time? (i,e MATRIX(1:60,:) --> dataset #1, MATRIX(61:181,:) --> dataset #2, MATRIX(182:272,:) --> dataset #3)
Or can I simply retrain my neural network three times by repeating the training line in the code, each time with a different dataset input/output? (Example in the code below)
%Create MLP Network
MLPNetwork=feedforwardnet(i,'trainlm');
MLPNetwork.trainparam.min_grad = 0.00000001;
MLPNetwork.trainParam.epochs = 10000;
MLPNetwork.trainParam.lr = 0.01;
%MLPNetwork.trainParam.max_fail =100;
MLPNetwork.divideParam.trainRatio = 70/100;
MLPNetwork.divideParam.valRatio = 15/100;
MLPNetwork.divideParam.testRatio = 15/100;
MLPNetwork=train(MLPNetwork,dataset1_input,dataset1_output);
MLPNetwork=train(MLPNetwork,dataset2_input,dataset2_output);
MLPNetwork=train(MLPNetwork,dataset3_input,dataset3_output);
%simulation%
Simulation_1=MLPNetwork(dataset1_input)
performance_1 = perform(dataset1_output,Simulation_1)
Simulation_2=MLPNetwork(dataset2_input)
performance_2 = perform(dataset2_output,Simulation_2)
Simulation_3=MLPNetwork(dataset1_input)
performance_3 = perform(dataset3_output,Simulation_3)
Little background on the nature of the datasets: The inputs are hourly weather data (Atmospheric pressure, wind speed.. etc) and the output is hourly water level. Hence datasets from different seasons are important.
Many thanks.
5 Comments
Greg Heath
on 28 Aug 2017
Your description indicates implies that there is no gap between sets 2 and 3. If correct, then combine them
1. Train a net on each of the 2 (3?) subsets.
2. Test each net with all subsets.
What you do next depends on the results of 2.
Good Luck.
Greg
christttttttophe
on 19 Jul 2019
The discontinuous time series is a bit of an enigma and there is very little documentation. For example, if you have 10 days of data from many different dates say, Jan 16th 2016, April 14th 2016, November 27th 2016, Dec 16th 2016, Feb 7th 2017, April 10th 2017 (each date has 10 days of data prior to the above date) and so on, with x(t) - for example jean material cost, number of workers, economic climate and so and other inputs and with y(t) being the price of jeans as the target. You say to train a separate net for each set of data and then test the other data sets on each net. Ok so let's say I get bad performance because right now there's no connection with the diversity of inputs x(t) that the nets need.
However, it's not clear how you connect the nets together to find the trend and predict the future price of jeans from this? Can you explain the steps a little. I'm sure it's simple, but I really can't see it. Thanks for your help.
christttttttophe
on 19 Jul 2019
The big question is how do you deal with uneven gaps in the timeseries data! Pretend it's not there?
Nada Almarshad
on 21 Jul 2019
Edited: Nada Almarshad
on 21 Jul 2019
Greg Heath
on 21 Jul 2019
Edited: Greg Heath
on 21 Jul 2019
Nada,
The "direct relationship" you have described is not a timeseries configuration.
Hope this helps.
Greg
Answers (0)
Categories
Find more on Deep Learning Toolbox in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!