How to analyse the results of training of neural network
1 次查看(过去 30 天)
显示 更早的评论
Hi, i tried to create neural network for classification using nprtool and i tried to modify the code but i couldn't analyse the results and what should i do with this results .So Can anyone please tell me because i have no idea ? This is my code :
x = patientInputs;
t = patientTargets;
N=1012
I=9
O=2
[ I N ] = size(x)
[ O N ] = size(t)
Ntrn = N-2*round(0.15*N) % 708
Ntrneq = Ntrn*O %1416
%For a robust design desire Ntrneq >> Nw or
H=10
Hub = -1+ceil( (Ntrneq-O) / (I+O+1)) % Hub =117
Nw = (I+1)*H+(H+1)*O % Number of unknown weights = 122
%H << Hub = -1+ceil( (Ntrneq-O) / (I+O+1))
Ntrials = 10
rng(0)
j=0
for h =round([Hub/10, Hub/2, Hub])
j = j+1
h = h %12
Nw = (I+1)*h+(h+1)*O % 146
Ndof = Ntrneq-Nw %1270
net = patternnet(h);
net.divideFcn = 'dividerand'; % 'dividetrain'
for i = 1:Ntrials
net = configure(net,x,t);
[ net tr outputs regerrors ] = train(net,x,t);
assignedclasses = vec2ind(outputs);
trueclasses = vec2ind(t);
classerr = assignedclasses~=trueclasses;
Nerr(i,j) = sum(classerr);
% FrErr = Fraction of Errors (Nerr/N)
[FrErr(i,j),CM,IND,ROC] = confusion(t,outputs);
FN(i,j) = mean(ROC(:,1)); % Fraction of False Negatives
TN(i,j) = mean(ROC(:,2)) ; % Fraction of True Negatives
TP(i,j) = mean(ROC(:,3)); % Fraction of True Positives
end
end
PctErr=100*Nerr/N
And this are the resultas that i got :
Ntrn =
708
Ntrneq =
1416
H =
10
Hub =
117
Nw =
122
Ntrials =
10
j =
0
j =
1
h =
12
Nw =
146
Ndof =
1270
j =
2
h =
59
Nw =
710
Ndof =
706
j =
3
h =
117
Nw =
1406
Ndof =
10
PctErr =
41.2055 37.5494 34.0909
46.3439 42.8854 43.0830
38.9328 35.8696 37.2530
41.4032 35.3755 37.5494
37.6482 42.5889 34.4862
41.6008 40.5138 32.8063
38.2411 41.6008 33.9921
38.0435 34.7826 37.0553
39.1304 37.0553 38.5375
38.0435 34.8814 35.5731
0 个评论
采纳的回答
Greg Heath
2017-6-15
It is considered ill-mannered to post the same problem in both
NEWSGROUP and ANSWERS
See my answer in the NEWSGROUP
Greg
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Deep Learning Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!