good test error and wrong relative output
    3 views (last 30 days)
  
       Show older comments
    
    Emiliano Rosso
      
 on 29 Mar 2015
  
    
    
    
    
    Commented: Emiliano Rosso
      
 on 31 Mar 2015
            I've a problem with my neural network. I use Matlab fitnet with trainlm and validation stop and without pre and post processing data. The test error is very good and so I imagine the output of new inputs is correct but this was not. I don't need to use normalization of new inputs because there's not pre and post processing function. After training I use one step new input to generate output because I can know only one step new input at a time. Somebody had the same problem? The code seems to be correct :
 net=fitnet(hiddenLayerSize);
 net.inputs{1}.processFcns = {};
 net.outputs{2}.processFcns = {};
 net.divideFcn = 'divideblock';
 [net,tr] = train(net,inputs,targets);
 outputs = net(inputs);
0 Comments
Accepted Answer
  Greg Heath
      
      
 on 30 Mar 2015
        What are the results of something like (Notice the deliberate omission of semicolons)
 [ I N ]  = size(x)
 [ O N ]  = size(t)
 MSE00    = mean(var(t',1))
 minmaxxt = minmax([x;t])
 figure(1)
 plot(x,t)
 hold on
 net            = fitnet(H);
 [ net tr y e ] = train(net,x,t);
 NMSE           = mse(e)/MSE00
 plot(x,y,'r.')
Next, use tr to obtain the indices for trn/val/tst and repeat for each subset i= trn,val,tst
 figure
 hold on
for i = 1:3
 [ Ii Ni ]  = size(xi)
 [ Oi Ni ]  = size(ti)
 MSE00i     = mean(var(ti',1))
 minmaxxiti = minmax([xi;ti])
 NMSEi      = mse(ei)/MSE00i
 plot(xi,ti)
 plot(xi,yi,'r.')
end
The purpose of this is to make sure the data is stationary, i.e., the statistics of the 3 subsets are comparable
THEN, if any new data appears to come from the same source, it can be verified by comparing it with each of the three subsets.
Hope this helps.
Thank you for formally accepting my answer
Greg
More Answers (0)
See Also
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!
