good test error and wrong relative output
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Emiliano Rosso
am 29 Mär. 2015
Kommentiert: Emiliano Rosso
am 31 Mär. 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 Kommentare
Akzeptierte Antwort
Greg Heath
am 30 Mär. 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
1 Kommentar
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Sequence and Numeric Feature Data Workflows finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!