Neural Network code
Show older comments
I have written a code in Matlab for neural network training and testing. But, it is not working as expected. I am training the network with input and target and testing it with test input and plotting the response against the actual response. mse is too high. The value of mse that I am getting is 15.4. Is there any mistake in the code? Can you take a look at the code and help me out !!
load a1.txt ( Input )
load a4.txt (Target)
load b1.txt (Test input)
load b4.txt (actual output)
P=[a1(1:2986,1)];
T=[a4(1:2986,1)];
a=[b1(1:2986,1)];
s=[b4(1:2986,1)];
[pn1,PS] = mapminmax(P');
[tn1,TS] = mapminmax(T');
[an1,AS]= mapminmax(a');
[sn1,SS]= mapminmax(s');
netnew1=newfit(pn1,tn1,[]);
[netnew1,tr1]=train (netnew1,pn1,tn1);
y2=sim(netnew1,an1);
y2_again = mapminmax('reverse',y2',TS);
plot(y2_again,'r');
hold;
plot(s);
d=(y2_again-s).^2;
mse1=mean(d);
Thanks & Regards,
Haritha Srinivasan
Accepted Answer
More Answers (1)
HARITHA
on 6 Oct 2011
0 votes
Categories
Find more on Deep Learning Toolbox in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!