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 CenterFile Exchange에서 Sequence 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