% Train on individual cells, % evaluate on individual cells clear all; addpath ~/matlab/ideas/hep2cells; load cellssimple_rotinv.mat xtrain = a; xtest = b; a = [a;b]; % get imageIDs from test: testimlab = getident(xtest,'image'); % the classifier: %u = scalem([],'variance')*loglc2([],0.01); %u = scalem([],'variance')*knnc; u = scalem([],'variance')*liknonc; %u = scalem([],'variance')*libsvc([],[],0.01); %u = scalem([],'variance')*libsvc([],proxm([],'r',12),1); % *************** % train on cells: % *************** wtrain = xtrain*u; % test on cells: acc_CC = 1-xtest*wtrain*testd; c_CC = confmat(xtest*wtrain); % test on image level: [labout,truelab] = majorityimagevote(xtest,wtrain); %[labout,truelab] = combinecells(xtest,wtrain); acc_CI = mean(all(truelab==labout,2)); c_CI = confmat(truelab,labout); if size(c_CI,2)