I'm trying to design a NN for spoken word recognition and classification into two classes i.e Yes class and No class, I have already built a network but the result obtained was poor. I did a research on how to improve NN performance and I found posts form matlab answers regarding this issue explaining how to improve performance yet there still some things ambiguous if any one can help answering my question regarding the code below it would be much helpful for me
[ I N ] = size( xtrn ) % [ 5 407 ]
[ O N ] = size( ttrn ) % [ 1 407 ]
MSEtrn00 = mean(var(ttrn',1))
MSEgoal = MSEtrn00/100
MinGrad = MSEtrn00/300
for h = 1:1:40
for n = 1: 10
net = patternnet(h);
net.divideFcn = 'dividetrain';
net.trainParam.goal = MSEgoal;
net.trainParam.min_grad = MinGrad;
[net tr ] = train(net,xtrn,ttrn);
bestepoch = tr.best_epoch;
R2(n,h) = 1 - tr.perf(bestepoch)/MSEtrn00;
R2 = R2
my questions are :- 1- when I increased the suggested no. of hidden nodes from 10 to 40, R2 increased why ?
2- through reading I found that R2 recommended to be ~=0.99 and what I got max(R2)=0.88 when I increase no. of hidden nodes, is what I did correct ?
3- R2 matrix sizes should be 10 rows and 40 columns, why am I getting R2(20,40) then ?
4- how to know which no. of hidden nodes achieve the required R2 ~=0.99 (i.e by using nodes=find(max(R2))) ?