Predict using new external input for narx model

2 次查看(过去 30 天)
Hi every one ,i want to test my narx network with new exogenous input to forecast the 59 futures values,i applied this code https://www.mathworks.com/help/deeplearning/ref/narxnet.html but its give me error when i use this function ypred=netc(xnew,xic,aic) ,and when i use this function ypred=netc(xnew) its give me the same value of all the columns i don't know what to do,please help me if you don't mide .thanks in advance

回答(1 个)

Raag
Raag 2025-3-11
Hi Wissal,
When predicting with a NARX network using new external inputs, it's important to prepare the input data so that the network’s internal states are properly updated. Instead of calling:
ypred = netc(xnew, xic, aic)
or
ypred = netc(xnew)
directly which may lead to errors or uniform outputs, you should use the ‘preparets’ function to format your new input data and initialize the network's delay states. For example:
% Prepare the new external input (xnew) along with empty target sequences
[xnewPrepared, xic, aic] = preparets(netc, xnew, {});
% Predict using the prepared inputs and initial conditions
ypred = netc(xnewPrepared, xic, aic);
This approach ensures that the ‘NARX’ network is provided with correctly formatted data and properly initialized states, avoiding errors and preventing the output from being constant across columns.
For a better understanding of the above solution, refer to the following MATLAB documentation:

类别

Help CenterFile Exchange 中查找有关 Deep Learning Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by