[1422d3]: / functions / functions_Classifiers / getNumberMisclassifiedSamples.m

Download this file

13 lines (11 with data), 250 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
function err = getNumberMisclassifiedSamples(C)
%init
err = 0;
%loop on confusion matrix
for f1 = 1 : size(C, 1)
for f2 = 1 : size(C, 2)
if f1 ~= f2
err = err + C(f1, f2);
end %if f1 ~= f2
end %for f1
end %for f2