Error using adapt in Neural Networks
Afficher commentaires plus anciens
I am trying to use Haar Wavelet Decomposition and feed it into a Neural Network(NARX) in order to predict the coefficients. I have tried the same code with simple inputs and it works just fine. However, when I enter the coefficients from the 'Haar' wavelet, it gives an error saying "Performance PERF is not finite". Below is the code and the corresponding error.
Code
=====
clc CSV_PATH=''; CSV_FILE = 'test2.csv'; ROWS = 931;
%Reading Input Data
[numData,textData,row] = xlsread(strcat(CSV_PATH,CSV_FILE));
for i=3:ROWS
data(i-2) = (row(i,1)) ;
end
CV = cell2mat(data);
%Wavelet Decomposition
[C,L] = wavedec(CV,1,'haar');
%Neural Networks
inputSeries = tonndata((1:465),true,false);
targetSeries = tonndata(C(1:465),true,false);
% Create a Nonlinear Autoregressive Network with External Input
inputDelays = 1:2;
feedbackDelays = 1:2;
hiddenLayerSize = [4 4 4];
net = narxnet(inputDelays,feedbackDelays,hiddenLayerSize);
[Xs,Xi,Ai,Ts] = preparets(net,inputSeries,{},targetSeries);
[net,a,e,pf] = adapt(net,Xs,Ts,Xi,Ai);
Error
=====
??? Error using ==> mse at 238
Performance PERF is not finite.
Error in ==> adaptwb>adapt_network at 94
gE(net.outputConnect,:) = feval(net.performFcn,'dperf_de',net,T(:,ts),
...
Error in ==> adaptwb at 39
[out1,out2,out3] = adapt_network(in1,in2,in3,in4);
Error in ==> network.adapt at 121
[net,Ac,tr] = feval(adaptFcn,net,Pd,T,Ai);
Error in ==> test_haar at 36
[net,a,e,pf] = adapt(net,Xs,Ts,Xi,Ai);
Can someone help me to identify the problem?
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur AI for Signals and Images dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!