From: ?mit on 5 Dec 2009 01:22 Hello, I am trying to classify a 5 different animal sounds by using neural network. So, in order to learn neural network, firstly i have started with nntool box .i have created a feed-forward backprop network with the following properties: Training function: TRAINLM Adaption learning function: LEARNGDM Performance function: MSE Number of layers:2 Number of neurans :30 Transfer functions: purelin for layer 1 -tansig for layer 2 i have trained the network and simulated it. i have got impressive results , around %80 recognition in test data.Then i created my own network with the following matlab code: in=xlsread('C:\Documents and Settings\XP\Desktop\ANN\input.xls'); target=xlsread('C:\Documents and Settings\XP\Desktop\ANN\target.xls'); test=xlsread('C:\Documents and Settings\XP\Desktop\ANN\test.xls'); test=test'; in=in'; target=target'; net14=newff(in,target,[30],{'purelin','tansig'},'trainlm'); net14.trainParam.epochs=100; net14.trainParam.time = Inf; net14.trainParam.goal = 0; net14.trainParam.max_fail = 5; net14.trainParam.mem_reduc = 1; net14.trainParam.min_grad = 1e-010; net14.trainParam.mu = 0.001; net14.trainParam.mu_dec = 0.1; net14.trainParam.mu_inc = 10; net14.trainParam.mu_max = 1e10; net14.trainParam.show = 50; net14trained=train(net14,in,target); y=sim(net14,test); i trained the network14 and simulated it . The results for this network are really bad. There isnt any recognition for the test data.why i got different results? am i missing something? Thanks
From: Greg Heath on 6 Dec 2009 13:31 On Dec 5, 1:22 am, "?mit " <newsrea...(a)mathworks.com> wrote: > Hello, > I am trying to classify a 5 different animal sounds by using neural network. > So, in order to learn neural network, firstly i have started with nntool box .i have created a feed-forward backprop network with the following properties: > > Training function: TRAINLM > Adaption learning function: LEARNGDM > Performance function: MSE > Number of layers:2 > Number of neurans :30 > Transfer functions: purelin for layer 1 -tansig for layer 2 In general, this is a poor choice. See my post on pretraining advice. 1.Center (standardization is recommended) the input vectors and use 'tansig' in the hidden layer. NEVER use 'purelin' for hidden nodes (You can get the same result if you remove 'purelin' hidden layers) 2. The outputs should be the corresponding columns of eye(5) and use 'logsig' in the output layer. 3. Make sure for the I-H-O topology, Ntrn and H are chosen so that Neq =Ntrn*O >> Nw = (I+1)*H+(H+1)*O Neq = number of output equations Nw = number of unknown weights 3. The class assignment is made to the class corresponding to the maximum output. 4. Summarize results in an 6X6 classification confusion matrix (count and/or percent) with row/column 6 of the count matrix containing row/column sums, etc > i have trained the network and simulated it. i have got impressive results , > around %80 recognition in test data. Compare this with the recommended approach. >Then i created my own network with the following matlab code: > > in=xlsread('C:\Documents and Settings\XP\Desktop\ANN\input.xls'); > target=xlsread('C:\Documents and Settings\XP\Desktop\ANN\target.xls'); > test=xlsread('C:\Documents and Settings\XP\Desktop\ANN\test.xls'); > test=test'; > in=in'; > target=target'; size(in) size(target) size(test) > net14=newff(in,target,[30],{'purelin','tansig'},'trainlm'); > net14.trainParam.epochs=100; > net14.trainParam.time = Inf; > net14.trainParam.goal = 0; > net14.trainParam.max_fail = 5; > net14.trainParam.mem_reduc = 1; > net14.trainParam.min_grad = 1e-010; > net14.trainParam.mu = 0.001; > net14.trainParam.mu_dec = 0.1; > net14.trainParam.mu_inc = 10; > net14.trainParam.mu_max = 1e10; > net14.trainParam.show = 50; can delete above commands that are not defaults for trainlm help trainlm I use something like net14.trainParam.goal = MSE00/100; % yields R^2 > 0.99 net14.trainParam.show = 10; where MSE00 is the MSE for the constant output y00 = repmat(mean(target,2),1,Ntrn)); MSE00 = mse(target-y00) > net14trained=train(net14,in,target); > y=sim(net14,test); > > i trained the network14 and simulated it . The results for this network are really bad. There isnt any recognition for the test data.why i got different results? am i missing something? 1. 'purelin' hidden layer 2. How are your targets coded? 3. Is Neq >> Nw satisfied? Hope this helps. Greg
|
Pages: 1 Prev: How to draw a square in an existing image? Next: Help on deprecated rand parameters |