Predict using new external input for narx model

3 visualizzazioni (ultimi 30 giorni)
Wissal Mass
Wissal Mass il 12 Ago 2022
Risposto: Raag il 11 Mar 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

Risposte (1)

Raag
Raag il 11 Mar 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:

Categorie

Scopri di più su Deep Learning Toolbox in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by