IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
aggr_obsidxs.m
Go to the documentation of this file.
1 %> @brief Pre-determined dataset splits
2 %>
3 %> The number of components and how their respective training data are obtained are pre-determined by the @ref obsidxs property.
4 %>
5 %> Allows multi-training but this is pointless unless the component classifiers are non-deterministic
6 %>
7 %> Not currently published in the GUI
8 classdef aggr_obsidxs < aggr
9  properties
10  %> must contain a block object that will be replicated as needed
11  block_mold = [];
12  %> Cell of vectors containing row indexes to a dataset. This is generated by some @ref sgs::get_obsidxs(). Such @ref sgs
13  %> needs have one bite only. It will probably be a [no_reps]x[1] cell
14  obsidxs;
15  end;
16 
17  methods
18  function o = aggr_obsidxs()
19  o.classtitle = 'Fixed sub-sampling';
20  end;
21  end;
22 
23  methods(Access=protected)
24  function o = do_boot(o)
25  end;
26 
27  % Adds classifiers when new classes are presented
28  function o = do_train(o, data)
29  no_reps = size(o.obsidxs, 1);
30 
31  ipro = progress2_open('AGGR_OBSIDXS', [], 0, no_reps);
32  for i_rep = 1:no_reps
33  datasets = data.split_map(o.obsidxs(i_rep, 1));
34 
35  cl = o.block_mold.boot();
36  cl = cl.train(datasets(1));
37  o = o.add_clssr(cl);
38 
39  ipro = progress2_change(ipro, [], [], i_rep);
40  end;
41  progress2_close(ipro);
42  end;
43  end;
44 end
Base Sub-dataset Generation Specification (SGS) class.
Definition: sgs.m:6
function progress2_change(in prgrss, in title, in perc, in i, in n)
Base class for all ensemble classifiers.
Definition: aggr.m:6
function progress2_open(in title, in perc, in i, in n)
function get_obsidxs(in o, in data)
Solves o.no_unitss.
Pre-processing block base class.
Definition: pre.m:2
Base Block class.
Definition: block.m:2
function progress2_close(in prgrss)
Analysis Session (AS) base class.
Definition: as.m:6
Pre-determined dataset splits.
Definition: aggr_obsidxs.m:8