source: birds/tstbirds.m @ 83

Last change on this file since 83 was 72, checked in by vcheplygina, 11 years ago
File size: 993 bytes
RevLine 
[68]1
[72]2load('birds20130709.mat');
[68]3
4
5w = {
6       
[72]7        %milvector([],'e')*scalem([],'variance')*loglc2*classc;
8       
9    scalem([],'variance')*milproxm([],'meanmin')*scalem([],'variance')*loglc2;
[68]10   
11       
12};
13wnames = getwnames(w);
14
15%set other parameters and storage:
16nrfolds = 5;
17nrw = length(w);
18err = repmat(NaN,[nrw 2 nrfolds]);
19
20% start the loops:
21I = nrfolds;
22for i=1:nrfolds
23   
24        dd_message(3,'%d/%d ',i,nrfolds);
25        [x,z,I] = milcrossval(a,I);
26
27        for j=1:nrw
28                dd_message(4,'.');
29                w_tr = x*w{j};
30                out = z*w_tr;
31      err(j,1,i) = out*testd;
32                err(j,2,i) = dd_auc(out*milroc);
33        end
34end
35dd_message(3,'\n');
36
37% and store everything nicely:
38if isempty(wnames) wnames = getwnames(w); end
39R = results(err,wnames,{'cl.error' 'AUC'},(1:nrfolds)');
40R = setdimname(R,'classifier','dataset','run');
41R = setname(R,getname(a));
42
43% And give some output to the command line:
44fprintf('\n%s\n\n',repmat('=',1,50));
45a
46S = average(100*R,3,'max1','dep');
47show(S,'text','%4.1f');
48
Note: See TracBrowser for help on using the repository browser.