source: hep2cells/dosimple.m @ 153

Last change on this file since 153 was 40, checked in by dtax, 12 years ago

HEp 2 cell classification, ICPR 2012 competition

File size: 904 bytes
RevLine 
[40]1% what do the simple approaches give?
2load cellssimplemax;
3%load cells_lbp_gauss3; gencellsimple
4xtrain = a; xtest = b;
5a = [a;b];
6
7%% add the different orientations...
8%b = a(:,1);
9%for i=0:7
10%   I = 1+((i*4):(i*4+3));
11%   b = [b mean(a(:,I),2)];
12%end
13%b = a;
14%a = a(:,[1:5]);
15
16
17% param:
18%u = scalem([],'variance')*knnc([],1);
19%u = fisherm([],4)*knnc;
20%u = scalem([],'variance')*parzenc;
21%u = fisherc;
22%u = ldc;
23u = scalem([],'variance')*libsvc;
24
25% train and test:
26w = xtrain*u;
27error_on_testset = xtest*w*testd
28
29
30% crossval on a:
31imlab = getident(a,'image');
32[nlab,baglab] = renumlab(imlab);
33nrfolds = length(baglab); % leave one image out
34
35e = zeros(nrfolds,1);
36Iall = (1:size(nlab,1))';
37
38for i=1:nrfolds
39   Jtst = find(nlab==i);
40   Jtrn = Iall; Jtrn(Jtst)=[];
41
42   x = a(Jtrn,:);
43   z = a(Jtst,:);
44%   f(i) = find(classsizes(z)>0)
45
46   w = x*u;
47   e(i,1) = z*w*testd;
48end
49e
50mean(e)
51error_on_testset
52
53
Note: See TracBrowser for help on using the repository browser.