source: hep2cells/combinerm.m @ 146

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

HEp 2 cell classification, ICPR 2012 competition

File size: 580 bytes
Line 
1function w = combinerm(u,varargin)
2
3N = length(u);
4if (N==1)
5   N = length(varargin);
6   tmpu = u; clear u;
7   for i=1:N
8      u{i} = tmpu;
9   end
10end
11u
12if nargin~=N+1
13   error('I need as many untrained mappings as datasets.');
14end
15if (N<2)
16   error('I want to combine at least 2 datasets.');
17end
18
19for i=1:N
20   if ~isa(varargin{i},'dataset')
21      error('Input %d should be a dataset.',i+1);
22   end
23   dim(i) = size(varargin{i},2);
24end
25alldim = sum(dim);
26cdim = cumsum(dim);
27
28w = featsel(alldim,1:dim(1))*u{1};
29for i=2:N
30   w = [w featsel(alldim,cdim(i-1)+(1:dim(i)))*u{i}];
31end
32
Note: See TracBrowser for help on using the repository browser.