Predict using new external input for narx model

3 Ansichten (letzte 30 Tage)
Wissal Mass
Wissal Mass am 12 Aug. 2022
Beantwortet: Raag am 11 Mär. 2025
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

Antworten (1)

Raag
Raag am 11 Mär. 2025
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:

Kategorien

Mehr zu Deep Learning Toolbox finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by