Predict using new external input for narx model
3 ビュー (過去 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
0 件のコメント
回答 (1 件)
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:
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Deep Learning Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!