Train NARX with multiple time series in ntstool

Dear all
I have three time series of experimental data. Each time series includes 3 input variables and one output variable. Using the catsamples command I turn the 3 input and outpup data series into two proper cell arrays Input and Output (uploaded in here).
In ntstool, choosing the option cell I can introduce my Output cell array. The tool succesfully recognizes that it includes 3 time series with 5598 timesteps of 1 element with 5
as shown below: Targets 'Output' is a 1x5598 cell array of 1x3 matrices, representing dynamic data: 3 series of 5598 timesteps of 1 element.
Nevertheless there is not an option to introduce the Input cell array, sine it has dimensions of 3x5598.
Is this a limitation of the tool? Is there another way to train the NARX? Could you please send me a script that fixes this problem?

5 commentaires

Arthur B
Arthur B le 14 Fév 2021
Hi Georgios,
Did you find an answer to your question?
I'm wondering exactly the same here: it seems you can't train the NARX using multiple obervations like we could do with lstm for example.
Georgios Etsias
Georgios Etsias le 17 Fév 2021
Modifié(e) : Georgios Etsias le 18 Fév 2021
Hello Arthur
Yes there is a way of doing so!
Lets say you have multiple input time series then you can use catsamples as follows:
Input = catsamples(c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,...
c12,c13,c14,c15,c16,c17,c18,c19,c20,c21,c22,'pad');
Then you need to turn the multydimensional training input cell aray into a cell row as follows:
for i=1:sizets % the size of your longest timeseries
TrainingInput(i).train=[cell2mat(Input(1,i));cell2mat(Input(2,i));cell2mat(Input(3,i))];
end
TrainingInput=TrainingInput';
TrainingInput = struct2cell(TrainingInput);
This way I made sure that the tool was reading a totak of 22 timesries of 3 elements (my independent variables) with multiple steps 9time series observations)
-------------------------------------------------------------------------------------------------------------------------------------------------
In this link (GitHub) I have a project of mine where I use NARX to make time-series prediction.
The DataPreProcessingBus2.m contains the actual lines of code to papproprietly pre-process multiple time-series so that they can be used with the ntstool.
I hope this helps.
All best
Georgios Etsias
Jee-Hoon Kim
Jee-Hoon Kim le 24 Fév 2021
Modifié(e) : Jee-Hoon Kim le 24 Fév 2021
Hello, I have some question on using NARX.
After training is done, the NARX can only predict the future output just after given input.
I found that the network needs not only the input but the data of just before.
Is there a way to predict output at other unrelated time?
Hello
With a closed-loop NARX prediction you just need the 1st value or so.
I think my answer to this question could be what you need..
I hope this helps.
Imola Fodor
Imola Fodor le 26 Jan 2022
Modifié(e) : Imola Fodor le 26 Jan 2022
multiple outputs are not possible?

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Deep Learning Toolbox dans Centre d'aide et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by