Changeset 46


Ignore:
Timestamp:
03/26/13 15:32:10 (12 years ago)
Author:
dtax
Message:

Changes....

Location:
hep2cells
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • hep2cells/dosimpleofficial.m

    r44 r46  
    99
    1010% the classifier:
    11 u =  loglc2;
     11%u =  scalem([],'variance')*loglc2([],0.01);
     12%u = scalem([],'variance')*knnc;
    1213u = scalem([],'variance')*liknonc;
     14%u = scalem([],'variance')*libsvc([],[],0.01);
     15%u = scalem([],'variance')*libsvc([],proxm([],'r',12),1);
    1316
    1417% ***************
     
    2124% test on image level:
    2225[labout,truelab] = majorityimagevote(xtest,wtrain);
     26%[labout,truelab] = combinecells(xtest,wtrain);
    2327acc_CI = mean(all(truelab==labout,2));
    2428c_CI = confmat(truelab,labout);
     29if size(c_CI,2)<size(c_CI,1), c_CI = [c_CI zeros(6,1)]; end
    2530
    2631% *********************
     
    5661   % test on images
    5762   [labout,truelab(i,:)] = majorityimagevote(z,w);
     63   %[labout,truelab(i,:)] = combinecells(z,w);
    5864   i1 = strmatch(char(truelab(i,:)),ll);
    5965   i2 = strmatch(labout,ll);
     
    6470
    6571dd_message(4,'\n');
     72
     73save results_liknon ll c_CC acc_CC c_CI acc_CI truelab n c_IC acc_IC c_II acc_II
    6674
    6775% show all:
  • hep2cells/gencellgabor.m

    r40 r46  
    11% load the data:
    2 load cells;
     2%load cells;
     3load cellscaled;
    34
    45% settings:
     
    2021   %im = x{i,1}(:,:,2);
    2122   im = sum(x{i,1}(:,:,2),3);
    22    if (min(im(:))<0)
    23       error('pixel values < 0');
    24    end
     23   %if (min(im(:))<0) error('pixel values < 0'); end
    2524%   im = im/max(im(:));
    2625   im = double(hist_equalize(im));
     
    4645   %im = z{i,1}(:,:,2);
    4746   im = sum(z{i,1}(:,:,2),3);
    48    if (min(im(:))<0)
    49       error('pixel values < 0');
    50    end
     47   %if (min(im(:))<0) error('pixel values < 0'); end
    5148%   im = im/max(im(:));
    5249   im = double(hist_equalize(im));
     
    6764end
    6865
    69 save cells_gabor x z;
     66save cells_gabor_sc x z;
  • hep2cells/gencellsimple.m

    r40 r46  
    11% generate a simple dataset for the cell images
    22%clear all; load cells_gabor;
     3function [a,b] = gencellsimple(x,z,dtype)
    34
    4 %dtype = 'max';
    5 dtype = 'nothing';
     5if nargin<3
     6   dtype = 'max';
     7end
    68
    79N = size(x,1);
     
    6365b = setident(b,imlab,'image');
    6466
    65 switch dtype
    66 case 'max'
    67    save cellssimplemax a b;
    68 case 'mean'
    69    save cellssimplemean a b;
    70 case 'var'
    71    save cellssimplevar a b;
    72 end
     67%switch dtype
     68%case 'max'
     69%   save cellssimplemax a b;
     70%case 'mean'
     71%   save cellssimplemean a b;
     72%case 'var'
     73%   save cellssimplevar a b;
     74%end
  • hep2cells/showconfmat.m

    r43 r46  
    99
    1010R = results(C,ll,ll);
    11 R = setdimname(R,'true class','estimated class');
     11R = setdimname(R,'true','estimated class');
    1212if nargout<1
    13    show(R,'text','%d');
     13   show(R,'text','%3d');
    1414end
Note: See TracChangeset for help on using the changeset viewer.