how to get best result of plot confusion figure

1 visualización (últimos 30 días)
rasha
rasha el 5 de Jul. de 2014
Respondida: Greg Heath el 6 de Jul. de 2014
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

Respuesta aceptada

Greg Heath
Greg Heath el 6 de Jul. de 2014
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

Más respuestas (0)

Categorías

Más información sobre Sequence and Numeric Feature Data Workflows en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by