how to make a neural network with a large matrix as inputs?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Amalia
am 14 Okt. 2014
Kommentiert: Greg Heath
am 17 Okt. 2014
this is the code:
Ptr=xlsread('liaa(16s).xlsx','sheet1','I3:I402');
T=xlsread('liaa(16s).xlsx','sheet1','G3:G402');
net=newff(Ptr,T,4,{'logsig','purelin'},'trainlm','learngdm');
[net,tr]=train(net,Ptr,T);
y=sim(net,Ptr)
plot(Ptr,T,'bo',Ptr,y,'r*');
title('Perbandingan antara Target (o) dan Output Jaringan (*)');
xlabel('input');
and the errors said:
??? Error using ==> plus
Matrix dimensions must agree.
Error in ==> calcperf2 at 163
N{i,ts} = N{i,ts} + Z{k};
Error in ==> trainlm at 253
[perf,El,trainV.Y,Ac,N,Zb,Zi,Zl] = calcperf2(net,X,trainV.Pd,trainV.Tl,trainV.Ai,Q,TS);
Error in ==> network.train at 219
[net,tr] = feval(net.trainFcn,net,tr,trainV,valV,testV);
Error in ==> training_lia_vt at 11
[net,tr]=train(net,Ptr,T);
Both Ptr and T are 400x1 matrix, and i couldn't get the program to run unless the matrix get transposed. but if transpose the matrix the results i get is reversed. i'm supposed to get a graphic like this one:
but instead the result is:
0 Kommentare
Akzeptierte Antwort
Greg Heath
am 14 Okt. 2014
1. The matrices should be transposed.
2. there are 5 relevant plots
a. input vs time
b. target vs time
c. target vs input
d. output superimposed on b
e. output superimposed on c
Hope this helps.
Thank you for formally accepting my answer
Greg
2 Kommentare
Greg Heath
am 17 Okt. 2014
1x400 is correct. If your results are backwards use fliplr.
You can plot your results any way you want.
Greg
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Define Shallow Neural Network Architectures 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!