Testing NARX on data without known target

9 Ansichten (letzte 30 Tage)
Mohsen Zabihi
Mohsen Zabihi am 21 Apr. 2016
Bearbeitet: Georgios Etsias am 9 Apr. 2023
I have a time series NARX neural network that is already trained on an external input, x(t), as well as the output's value at certain timesteps before (d past values of y(t)). Now I would like to take the trained network, input a new external input x(t), and get a time series prediction output. To prepare the inputs for getting the outputs I would need to use preparets to get the correct form of x(t), inputStates and layerStates, but it seems from the documentation that a target series is required for this. Since this is a test, I don't have a target series, what should I do? (I have no clue what the output y(t) would be (since this is a test).)
Thanks,
Mohsen
  1 Kommentar
ben howey
ben howey am 27 Aug. 2018
Hi,
Did you get an answer to this? I am currently trying to do the same thing. I have six degree of freedom motion data and associated pressure time series for each tilmestep. I have a NARX model that appears to predict the pressure very well. I now want to predict the pressure for other motion time series that I do not have the pressure data for.
What is the point of a NARX model if it can only predict data when a target is given? Surely you already know the output in this case so its not very useful?
...Very confused.
Any help in laymans terms would be great!
Thanks

Melden Sie sich an, um zu kommentieren.

Antworten (2)

Georgios Etsias
Georgios Etsias am 3 Mai 2020
Hello,
I know it has been four years since this question was done, and 2 years since the last comment. Nevertheless, I think it is worth answering this. You can indeed make a prediction for a new data set without having any target outputs.
One of the characteristic elements of NARX are the input delays. In order to get a good prediction in a new test set you just need a number of output targets equal to the input delays of your network (1 or 2 might be enough in most cases). If you do not have any target outputs (T) at all, you can put a random cell array including only 'zeros' or 'ones' (or some initial values that seem good enough). The initial predictions of the time series will probably not be good, but sooner or later the impact of the 'bad' initial values will diminish and the NARX will start giving good results again.
In the next figure a trained closed loop NARX was used to predict a new testing time series (2900 sec) that its target outputs were known to me. In the first instance (blue line) instead of the available target outputs I used some random values (ones). I the next case (orange) I used the correct output values for the first two seconds and then, used the same random values as before. The orange line predicted the results really good, while the blue and orange line converge after approx. 1000 sec. So your best shot is to utilize a few initial target values that are logical enough and let NARX do the rest.
I hope this helps.
All best
Georgios
PS When using the typical commands to make a predicytion with a closed loop NARX, T is your target goals:
net = closeloop(net);
view(net)
[Xs,Xi,Ai] = preparets(net,X,{},T);
y = net(Xs,Xi,Ai);
  2 Kommentare
salma ben ftima
salma ben ftima am 12 Mai 2021
Hi, thank you for this solution, but i want to ask you if it is necessary to test the narx in closedloop or we can do it also in open loop(since i have the same issue i created a narx trained in openloop and i want to test it with new external inputs with unkown targets)
Georgios Etsias
Georgios Etsias am 9 Apr. 2023
Bearbeitet: Georgios Etsias am 9 Apr. 2023
You can find the source code for this example in my GitHub repo:

Melden Sie sich an, um zu kommentieren.


Greg Heath
Greg Heath am 26 Apr. 2016
You cannot test a net without knowing the target.
Hope this helps.
Thank you for formally accepting my answer
Greg
  2 Kommentare
Mohsen Zabihi
Mohsen Zabihi am 26 Apr. 2016
Nope! I believe the answer is not correct. I searched more and found your answer to another question: http://www.mathworks.com/matlabcentral/answers/164977#answer_193063
based on this, it is possible to test NEW DATA with UNKNOWN TARGETS.
Thanks, Mohsen
Greg Heath
Greg Heath am 26 Apr. 2016
RATS!!!, I wrote a long refute to your argument and lost it by hitting a wrong key. In short (Sorry for the brevity)
1. The input is not new, it is the same one used for design.
2. The new CL situation is that
[ x(1:2) t(1:2) x(3:end) y1(3:end)]
is replaced by
[ x(1:2) [0,0] x(3:end) y2(3:end)]
However, the default normalization yields
-1 <= yn(1:2) < 1
with an expected value of yn(1:2)close to [0,0].
So, no biggie.
3. However, your situation replaces x with xnew. That is an entirely different situation and not expected to be fruitful unless xnew is something like x.
Hope this was clear
Greg

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Sequence and Numeric Feature Data Workflows finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by