IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
aggr_mold.m
Go to the documentation of this file.
1 %> @brief Fixed, pre-determined components
2 %>
3 %> Each time the block is @ref train()ed, a new batch of classifiers (defined by the @ref aggr_mold::block_mold property) will be trained and added.
4 classdef aggr_mold < aggr
5  properties
6  %> This can either be a single block or a cell of blocks
7  block_mold = [];
8  end;
9 
10  methods
11  function o = aggr_mold(o)
12  o.classtitle = 'Molded Ensemble';
13  o.flag_ui = 0;
14  end;
15 
16  end;
17 
18  methods(Access=protected)
19  % Adds classifiers when new classes are presented
20  function o = do_train(o, data)
21  if ~iscell(o.block_mold)
22  mold = {o.block_mold};
23  else
24  mold = o.block_mold;
25  end;
26 
27  for i = 1:numel(mold)
28  cl = mold{i}.boot();
29  cl = cl.train(data);
30  o = o.add_clssr(cl);
31  end;
32  end;
33  end;
34 end
Base class for all ensemble classifiers.
Definition: aggr.m:6
Pre-processing block base class.
Definition: pre.m:2
Base Block class.
Definition: block.m:2
Property block_mold
This can either be a single block or a cell of blocks.
Definition: aggr_mold.m:10
Fixed, pre-determined components.
Definition: aggr_mold.m:4