Blame view

matlab/cls_PlotConfusionMatrix.m 257 Bytes
3e63cf17   David Mayerich   added matlab file...
1
2
3
4
5
6
7
8
9
10
11
12
13
  function cls_PlotConfusionMatrix(M)
  
  
  %normalize each row by its column
  sum_cols = repmat(sum(M, 1), size(M, 1), 1);
  Mc = M ./ sum_cols;
  subplot(2, 1, 1),
  bar(Mc');
  
  sum_rows = repmat(sum(M, 2), 1, size(M, 2));
  Mr = M ./ sum_rows;
  subplot(2, 1, 2),
  bar(Mr);