could anyone help me to compute the confusion matrix for training,validation and testing data set
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
code:
x = irisInputs;
t = irisTargets;
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)
confusionmat(yind,tind)
The above code executes and gives me the result of overall confusion matrix.
but I want to compute the confusion matrix of training,validation and testing data set separately.
Could anyone please help me on it.
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Pattern Recognition and Classification finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!