1 %> @brief Base
class for all ensemble classifiers
3 %> Multiple Training-compatible
10 %> =0. Whether to record the estimations of the component classifiers into the object (@c o ) itself in the @c do_use() method.
15 %> (Read-only) @c
estimato objects carried out of @c do_use() if @c flag_ests is true
17 %> (Read-only) Structure array with fields @c
block and @c classlabels
23 o.classtitle = 'Ensemble';
26 function o = add_clssr(o, cl)
28 o.blocks(nb+1).
block = cl;
29 o.blocks(nb+1).classlabels = cl.classlabels;
30 o.classlabels = union(o.classlabels, cl.classlabels);
33 % % % TODO not sure about this, gotta see where used, then find solution
34 % % function z = getbatch(o, propname)
35 % % no_mod = length(a.blocks);
36 % % % initializes output
40 % % eval(sprintf('out = out+a.blocks{%d}.%s;
', m, propname));
45 methods(Access=protected)
47 %> Deletes all components and creates default @ref aggr::esag if needed
48 function o = do_boot(o)
49 o.blocks = struct('block', {}, 'classlabels
', {});
51 o.esag = esag_linear1();
55 %> Default training passes same dataset to each block.
56 function o = do_train(o, data)
59 o.blocks{i}.block = o.blocks{i}.block.train(data);
63 %> Uses blocks and aggregates @c est 's
using @c o.esag
66 function est = do_use(o, data)
70 [o.blocks(i).
block, ests_(i)] = o.blocks(i).block.use(data);
71 ests_(i) = ests_(i).change_classlabels(o.classlabels);
74 est = o.
esag.use(ests_);
Base class for all ensemble classifiers.
Estimation Aggregator - combines estimato objects together.
Estimation Aggregator - Linear Combination of datasets.
Dataset representing estimation.