1 %> @brief Bagging ensemble.
3 %> Each time the classifier is trained, several component classifiers will be generated. The number of components and how their
4 %> respective training data are obtained are specified by the @c
sgs property.
6 %> Allows multi-training.
8 %> Can be used
for undersampling. Use an
sgs_randsub with balanced properties.
11 %> must contain a
block object that will be replicated
as needed
13 %> SGS to
do the bagging. Doesn
't need to be a sgs_randsub one, actually. K-fold will work, too.
18 function o = aggr_bag()
19 o.classtitle = 'Bagging
';
23 methods(Access=protected)
24 function o = do_boot(o)
28 % Adds classifiers when new classes are presented
29 function o = do_train(o, data)
30 obsidxs = o.sgs.get_obsidxs(data);
31 no_reps = size(obsidxs, 1);
33 % ipro = progress2_open('BAGGING
', [], 0, no_reps);
35 datasets = data.split_map(obsidxs(i_rep, 1));
37 cl = o.block_mold.boot();
38 cl = cl.train(datasets(1));
40 % ipro = progress2_change(ipro, [], [], i_rep);
42 % progress2_close(ipro);
Base Sub-dataset Generation Specification (SGS) class.
Base class for all ensemble classifiers.
Analysis Session (AS) base class.