I tried to build NN for spoken word classification I followed many approaches discussed here in th group, yet the results terrible I got only ~65% correct classification, I don't what wrong I'm so desperate.
I appreciate any help or notice on my code or the approach I followed
load yesClass2;
load noClass2;
yes2=1*ones(1,199);
no2=zeros(1,208);
InData=[yesClass2 ;noClass2];
InData=InData';
TarData=[yes2 no2];
xtrn=InData;
ttrn=TarData;
[ I N ] = size( xtrn )
[ O N ] = size( ttrn )
MSEtrn00 = mean(var(ttrn',1))
MSEgoal = MSEtrn00/100
MinGrad = MSEtrn00/300
net4 = patternnet(58,'trainlm');
net4.divideFcn = 'dividetrain';
net4.trainParam.goal = MSEgoal;
net4.trainParam.min_grad = MinGrad;
[net4 tr ] = train(net4,xtrn,ttrn);
bestepoch = tr.best_epoch;
R2 = 1 - tr.perf(bestepoch)/MSEtrn00;
save net4 net4
- I chose No. of hidden nodes 58 based on max. R2 achieved
- max. R2 = 0.9
- I attached confusion matrix for complete data set used for training and for divided data set into 70% training, 30% validation and 30% testing