1 %> Tracking the improvement of classification with addition of component classifiers
19 dstest = pie(2); % Separates an independent set
for testing
27 lob.estlabels = ddemo.classlabels;
28 lob.testlabels = ddemo.classlabels;
32 % de.decisionthreshold = 0;
33 de.decisionthreshold = 0; %0.750000001;
41 o = o.setbatch({
'type',
'linear'});
45 o.title =
'SVM - weighted';
47 o.gamma = 1.25; % these values were found through grid search
51 clssr_mold = clssr_d01;
52 % clssr_mold = clssr_svm01;
55 % SGS
for the bagging classifier below
56 % It is basically a balanced randsub that will always select all the transformed colonies and the same amount of non-transformed colonies
70 % esag01.threshold = 0.6000001;
77 o.block_mold = clssr_mold;
89 % Parameters
for the get_insane_html() calls
90 pp.flag_discount_rejected = 1;
91 pp.flag_individual = 0;
96 n = 100; % Number of repetitions / final number of classifiers in the bag
97 specs = zeros(1, n); % specificities
98 senss = specs; % sensitivities
103 est =
clssr.use(dstest);
110 lob = lob.allocate(1);
111 lob = lob.record(ss);
113 C = lob.get_C([], 1, 3, 1); % Confusion matrix containing average percentages
120 %% Now train-tests using one classifier only to
compare
121 clssr = clssr_mold.boot();
122 clssr = clssr.train(dstrain);
124 est = clssr.use(dstest);
131 lob = lob.allocate(1);
132 lob = lob.record(ss);
134 C = lob.get_C([], 1, 3, 1);
136 fprintf('Single classifier: specificity: %g%%; sensitivity: %g%%\n', C(1, 2), C(2, 3));
137 fprintf('Bagging top: specificity: %g%%; sensitivity: %g%%\n', max(specs), max(senss));
146 plot(nn, specs, 'k', 'LineWidth', 4);
148 title('Specificity (correct classification of Non-transformed colonies)');
152 plot(nn, senss, 'k', 'LineWidth', 4);
155 title('Sensitivity (correct classification of Transformed colonies)');
156 xlabel('Number of component classifiers');
function data_select_hierarchy(in data, in hierarchy)
function compare(in o1, in o2)
Linear and Quadratic discriminant.
function maximize_window(in h, in aspectratio, in normalizedsize)
function boot(in o)
Resets classlabels and calls clssr::boot()
Block that resolves estimato posterior probabilities into classes.
Estimation Aggregator - Linear Combination of datasets.
function save_as_png(in h, in fn, in dpi)
Records (test class)x([rejected, estimation class]) hits.
function load_data_she5trays()
function data_split_sgs(in data, in sgs)
Support Vector Machine Classifier using LibSVM.