How to improve the accuracy of confusion matrix of neural network?

1 回表示 (過去 30 日間)
afef
afef 2017 年 6 月 5 日
コメント済み: Greg Heath 2017 年 6 月 6 日
Hi, i used nprtool to create neural network for classification and i have dataset with input matrix 9*981 and target matrix 2*981. This is my code :
x = inputpatient';
t = targetpatient';
% Choose a Training Function
% For a list of all training functions type: help nntrain
% 'trainlm' is usually fastest.
% 'trainbr' takes longer but may be better for challenging problems.
% 'trainscg' uses less memory. Suitable in low memory situations.
trainFcn = 'trainscg'; % Scaled conjugate gradient backpropagation.
% Create a Pattern Recognition Network
hiddenLayerSize = 10;
net = patternnet(hiddenLayerSize);
% Setup Division of Data for Training, Validation, Testing
net.divideParam.trainRatio = 70/100;
net.divideParam.valRatio = 15/100;
net.divideParam.testRatio = 15/100;
% Train the Network
[net,tr] = train(net,x,t);
% Test the Network
y = net(x);
e = gsubtract(t,y);
performance = perform(net,t,y)
tind = vec2ind(t);
yind = vec2ind(y);
percentErrors = sum(tind ~= yind)/numel(tind);
% View the Network
view(net)
% Plots
% Uncomment these lines to enable various plots.
%figure, plotperform(tr)
%figure, plottrainstate(tr)
%figure, ploterrhist(e)
%figure, plotconfusion(t,y)
%figure, plotroc(t,y)
After training my net i got this confusion matrix
I want to improve my net because as you can see from my confusion matrix the accuracy is 65.9 % . Please i need help can anyone give me advice ?

採用された回答

Greg Heath
Greg Heath 2017 年 6 月 6 日
編集済み: Greg Heath 2017 年 6 月 6 日
1. Search both the NEWSGROUP and ANSWERS using
greg patternnet
and
greg patternnet tutorial
2. Many of the posts
a. Use as many defaults as possible
b. Search for the smallest successful number of hidden nodes and
corresponding random initial weights using a double loop
approach:
i) Outer loop over number of hidden nodes
ii) Inner loop over random initial weights.
Hope this helps.
Thank you for formally accepting my answer
Greg
  2 件のコメント
afef
afef 2017 年 6 月 6 日
Thanks for your answer but i don't know how to do the part when you are talking about: "Search for the smallest successful number of hidden nodes and corresponding random initial weights using a double loop approach: i) Outer loop over number of hidden nodes ii) Inner loop over random initial weights." Can you please give me a hint?
Greg Heath
Greg Heath 2017 年 6 月 6 日
Hint: Searching with
greg patternnet Ntrials
yields the following number of hits
NEWSGROUP ANSWERS GOOGLE
11 74 38,600
Hope this helps
Greg

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSequence and Numeric Feature Data Workflows についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by