Changeset 46
- Timestamp:
- 03/26/13 15:32:10 (12 years ago)
- Location:
- hep2cells
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
hep2cells/dosimpleofficial.m
r44 r46 9 9 10 10 % the classifier: 11 u = loglc2; 11 %u = scalem([],'variance')*loglc2([],0.01); 12 %u = scalem([],'variance')*knnc; 12 13 u = scalem([],'variance')*liknonc; 14 %u = scalem([],'variance')*libsvc([],[],0.01); 15 %u = scalem([],'variance')*libsvc([],proxm([],'r',12),1); 13 16 14 17 % *************** … … 21 24 % test on image level: 22 25 [labout,truelab] = majorityimagevote(xtest,wtrain); 26 %[labout,truelab] = combinecells(xtest,wtrain); 23 27 acc_CI = mean(all(truelab==labout,2)); 24 28 c_CI = confmat(truelab,labout); 29 if size(c_CI,2)<size(c_CI,1), c_CI = [c_CI zeros(6,1)]; end 25 30 26 31 % ********************* … … 56 61 % test on images 57 62 [labout,truelab(i,:)] = majorityimagevote(z,w); 63 %[labout,truelab(i,:)] = combinecells(z,w); 58 64 i1 = strmatch(char(truelab(i,:)),ll); 59 65 i2 = strmatch(labout,ll); … … 64 70 65 71 dd_message(4,'\n'); 72 73 save results_liknon ll c_CC acc_CC c_CI acc_CI truelab n c_IC acc_IC c_II acc_II 66 74 67 75 % show all: -
hep2cells/gencellgabor.m
r40 r46 1 1 % load the data: 2 load cells; 2 %load cells; 3 load cellscaled; 3 4 4 5 % settings: … … 20 21 %im = x{i,1}(:,:,2); 21 22 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 25 24 % im = im/max(im(:)); 26 25 im = double(hist_equalize(im)); … … 46 45 %im = z{i,1}(:,:,2); 47 46 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 51 48 % im = im/max(im(:)); 52 49 im = double(hist_equalize(im)); … … 67 64 end 68 65 69 save cells_gabor x z;66 save cells_gabor_sc x z; -
hep2cells/gencellsimple.m
r40 r46 1 1 % generate a simple dataset for the cell images 2 2 %clear all; load cells_gabor; 3 function [a,b] = gencellsimple(x,z,dtype) 3 4 4 %dtype = 'max'; 5 dtype = 'nothing'; 5 if nargin<3 6 dtype = 'max'; 7 end 6 8 7 9 N = size(x,1); … … 63 65 b = setident(b,imlab,'image'); 64 66 65 switch dtype66 case 'max'67 save cellssimplemax a b;68 case 'mean'69 save cellssimplemean a b;70 case 'var'71 save cellssimplevar a b;72 end67 %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 9 9 10 10 R = results(C,ll,ll); 11 R = setdimname(R,'true class','estimated class');11 R = setdimname(R,'true','estimated class'); 12 12 if nargout<1 13 show(R,'text','% d');13 show(R,'text','%3d'); 14 14 end
Note: See TracChangeset
for help on using the changeset viewer.