How to vary the units in the hidden layer for a feedforwardnet and get the number of units which give the highest % of Correct Classification?
2 views (last 30 days)
Show older comments
The code looks as follows, n is the number of layers in the input layer. I want to vary the value of n from 1 to 100 and obtain the value for which the value of Correct Classification i.e. 100*(1-c) is maximum:
NW = feedforwardnet(n);
view(NW);
[NW,tr] = train(NW, Train_Feat, Train_Resp);
nntraintool;
plotperform(tr);
testR = NW(Test_Feat);
plotconfusion(Test_Resp,testR);
[c,cm] = confusion(Test_Resp,testR);
fprintf('Percentage Correct Classification : %f%%\n', 100*(1-c));
fprintf('Percentage Incorrect Classification : %f%%\n', 100*c);
0 Comments
Answers (0)
See Also
Categories
Find more on Deep Learning Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!