Last change
on this file since 136 was
40,
checked in by dtax, 12 years ago
|
HEp 2 cell classification, ICPR 2012 competition
|
File size:
580 bytes
|
Rev | Line | |
---|
[40] | 1 | function w = combinerm(u,varargin) |
---|
| 2 | |
---|
| 3 | N = length(u); |
---|
| 4 | if (N==1) |
---|
| 5 | N = length(varargin); |
---|
| 6 | tmpu = u; clear u; |
---|
| 7 | for i=1:N |
---|
| 8 | u{i} = tmpu; |
---|
| 9 | end |
---|
| 10 | end |
---|
| 11 | u |
---|
| 12 | if nargin~=N+1 |
---|
| 13 | error('I need as many untrained mappings as datasets.'); |
---|
| 14 | end |
---|
| 15 | if (N<2) |
---|
| 16 | error('I want to combine at least 2 datasets.'); |
---|
| 17 | end |
---|
| 18 | |
---|
| 19 | for 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); |
---|
| 24 | end |
---|
| 25 | alldim = sum(dim); |
---|
| 26 | cdim = cumsum(dim); |
---|
| 27 | |
---|
| 28 | w = featsel(alldim,1:dim(1))*u{1}; |
---|
| 29 | for i=2:N |
---|
| 30 | w = [w featsel(alldim,cdim(i-1)+(1:dim(i)))*u{i}]; |
---|
| 31 | end |
---|
| 32 | |
---|
Note: See
TracBrowser
for help on using the repository browser.