% compute and display test error
num_classes = 4;
y = [1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 4]';
pred_l = [1 1 2 3 2 2 3 4 3 3 4 1 4 4 1 2]';
conf_matrix = zeros(num_classes, num_classes);
for c = 1:num_classes
indices = find(y==c);
for c2 = 1:num_classes
conf_matrix(c, c2) = sum(pred_l(indices)==c2);
end
disp([c ' error: ' num2str(sum(pred_l(indices)~=c))]);
end
disp('Confusion Matrix: ');
disp(num2str(conf_matrix));
Subscribe to:
Post Comments (Atom)
-
To install pngwrite we need to install to helper library before we install pngwriter. 1. libpng 2. freetype2 We can use fink or macport to i...
-
Parsing and displaying dates and times is often complicated because of formatting and locale issues. Java 2 Platform, Standard Edition (J2S...
No comments:
Post a Comment