NARXNET: Target Test Data needed for prediction... why?

1 回表示 (過去 30 日間)
ThomasP
ThomasP 2022 年 3 月 28 日
回答済み: Hari 2023 年 10 月 16 日
Hello,
why is the target data needed to make predictions using Narxnet. I find it a bit weird because I want predictions solely based on my Input data, I don't want the Network to "cheat" using target data to make predictions....
this is the way to make predictions using Narxnet:
[Xs1,Xio,Aio] = preparets(net,inputSeries,{},targetSeries);
[Y1,Xfo,Afo] = net(Xs1,Xio,Aio);
[netc,Xic,Aic] = closeloop(net,Xfo,Afo);
[yPred,Xfc,Afc] = netc(inputSeriesVal,Xic,Aic);
multiStepPerformance = perform(net,yPred,targetSeriesVal);
as you can see from the first line, the targetSeries is needed in preparets, without it the network can't make a prediction, why so? And does the network actually "cheat" using the targetSeries for its predictions?

回答 (1 件)

Hari
Hari 2023 年 10 月 16 日
Hi ThomasP,
I understand that you have concerns about the use of target data in making predictions using “Narxnet. You want predictions solely based on your input data and are wondering why the target data is needed in the preparets function.
The target data is required in the preparets function of Narxnet because it is used for training and evaluating the network. In time series prediction, the network learns from the historical input-output patterns to make predictions for future data points.
The network does not "cheat" by using the target data for predictions. During training, the network adjusts its weights and biases based on the input-output pairs. Once trained, the network can make predictions based on the input data alone, without relying on the target data.
Here's an example to illustrate the process:
% Assuming you have already created and trained a Narxnet model 'net'
inputSeries = ...; % Historical input data
targetSeries = ...; % Corresponding target data
[Xs1, Xio, Aio] = preparets(net, inputSeries, {}, targetSeries);
[Y1, Xfo, Afo] = net(Xs1, Xio, Aio);
% The network is now trained and ready for predictions.
inputSeriesVal = ...; % New input data for prediction
[netc, Xic, Aic] = closeloop(net, Xfo, Afo);
% Use the trained closed-loop network to make predictions on the new input data using the netc function.
[yPred, Xfc, Afc] = netc(inputSeriesVal, Xic, Aic);
Refer to the documentation of “preparets” and “narxnet” for more information.
Hope this helps!

カテゴリ

Help Center および File ExchangeSequence and Numeric Feature Data Workflows についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by