how to get best result of plot confusion figure

how to get best of plot confusion figure when we train my neural network my neural network contain of input of 500*100 and target of 5*100 we want to classification the into 5 class

 채택된 답변

Greg Heath
Greg Heath 2014년 7월 6일

0 개 추천

Quick answer: Also use the confusion function and test on one or more MATLAB nndataset examples
NOTE: I have removed some of the ending semicolons so that you can see the output in the command window
help/doc confusion % Sometimes doc is more informative than help
help/doc plotconfusion
help/doc nndatasets
Two good examples for this question are
help/doc simpleclass_dataset
help/doc iris_dataset % Notice the error: replace 1000 with 150
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%55
clear all, close all, clc
[ x, t ] = iris_dataset;
[ I N ] = size(x) % [ 4 150 ]
[ O N ] = size(t) % [ 3 150 ]
% Make sure that columns of t are columns of eye(3)
minmaxt = minmax(t)
% minmaxt = 0 1
% 0 1
% 0 1
innert = find(0 < t & t < 1) % Empty matrix: 0-by-1
H = 2 % No. of hidden nodes (default H=10 is overfitting)
net = patternnet(H);
rng(0)
[ net tr y e ] = train(net,x,t); % e = t-y
[c,cm,ind,per] = confusion(t,y)
plotconfusion(t,y);
% NOTE: You may want to type tr = tr to see what is in the training record
Hope this helps.
Thank you for formally accepting my answer
Greg

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기

질문:

2014년 7월 5일

답변:

2014년 7월 6일

Community Treasure Hunt

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

Start Hunting!

Translated by