3 %> @todo is there a way to make
this testable
as classifiers are added?
5 %> Reference: Kuncheva, I.
"Combining Patten Classifiers", Wiley, 2004.
7 %> @sa uip_aggr_adaboost.m
10 %> must contain a
block object that will be replicated
as needed
14 %> Number of classifiers to be generated
16 %> Coefficient to multiply weights by
for misclassified samples
19 properties(SetAccess=
protected)
20 % Weight updating coefficients per iteration
26 o.classtitle = 'Adaboost';
30 methods(Access=protected)
31 % Adds classifiers when new classes are presented
32 function o = do_train(o, data)
37 o.classlabels = data.classlabels;
38 osgs = o.sgs.setup(data);
40 weights = ones(1, data.no);
43 o.betas = zeros(1, o.no_clssrs);
47 osgs.weights = weights;
48 obsidxs = osgs.get_obsidxs_new();
50 dtrain = data.split_map(obsidxs(1, 1));
51 cl = o.block_mold.boot();
52 cl = cl.train(dtrain);
57 flags_missed =
renumber_classes(est.classes, est.classlabels, data.classlabels) ~= data.classes;
59 rateperc = sum(~flags_missed)/data.no;
60 beta = (1-rateperc)/(rateperc+realmin);
64 weights(~flags_missed) = weights(~flags_missed)*beta;
66 o.blocks(i).
block = cl;
67 o.blocks(i).classlabels = dtrain.classlabels;
Base Sub-dataset Generation Specification (SGS) class.
function progress2_change(in prgrss, in title, in perc, in i, in n)
Base class for all ensemble classifiers.
function progress2_open(in title, in perc, in i, in n)
Block that resolves estimato posterior probabilities into classes.
function progress2_close(in prgrss)
function renumber_classes(in classes_orig, in classlabels_orig, in classlabels_ref)
Analysis Session (AS) base class.