IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
blmisc_split_ovr.m
Go to the documentation of this file.
1 %> @brief One-Versus-Reference dataset split class combination
2 %>
3 %> Will result in n-1 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  idx_ref = 1;
10  end;
11 
12  methods
13  function o = blmisc_split_ovr()
14  o.classtitle = 'One-Versus-Reference';
15  o.flag_ui = 1;
16  end;
17  end;
18 
19  methods(Access=protected)
20  function datasets = do_use(o, data)
21 
22  temp = data_split_classes(data, o.hierarchy);
23  classmap = classlabels2cell(data.classlabels, o.hierarchy);
24  ii = 0;
25  for i = 1:length(temp)
26  if i ~= o.idx_ref
27  ii = ii+1;
28  datasets(ii) = data_merge_rows(temp([o.idx_ref, i]));
29  datasets(ii).title = [classmap{i, 3} ' vs. ' classmap{o.idx_ref, 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
function data_split_classes(in data, in hierarchy)
function classlabels2cell(in classlabels, in new_hierarchy)
function data_merge_rows(in datasets)
One-Versus-Reference dataset split class combination.