IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
blmisc_split_ovo.m
Go to the documentation of this file.
1 %> @brief One-Versus-One dataset split class combination
2 %>
3 %> Will result in n*(n-1)/2 datasets. Each dataset will have two classes: the one corresponding to idx_ref and one of the other classes
4 %>
5 %> Not published in GUI.
7  properties
8  hierarchy = [];
9  end;
10 
11  methods
12  function o = blmisc_split_ovo()
13  o.classtitle = 'One-Versus-One';
14  o.flag_ui = 1;
15  end;
16  end;
17 
18  methods(Access=protected)
19  function datasets = do_use(o, data)
20 
21  temp = data_split_classes(data, o.hierarchy);
22  n = numel(temp);
23  classmap = classlabels2cell(data.classlabels, o.hierarchy); % For the titles
24  ii = 0;
25  for i = 1:n
26  for j = i+1:n
27  ii = ii+1;
28  datasets(ii) = data_merge_rows(temp([i, j]));
29  datasets(ii).title = [classmap{i, 3} ' vs. ' classmap{j, 3}];
30  end;
31  end;
32  end;
33  end;
34 end
35 
Base class for blocks that split one dataset into many.
Definition: blmisc_split.m:2
Scans IRootLab directories and build hierarchical class maps.
Definition: classmap.m:7
Property classtitle
Class Title. Should have a descriptive name, as short as possible.
Definition: irobj.m:50
function data_split_classes(in data, in hierarchy)
One-Versus-One dataset split class combination.
function classlabels2cell(in classlabels, in new_hierarchy)
function data_merge_rows(in datasets)