IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
decider.m
Go to the documentation of this file.
1 %> @brief Block that resolves @ref estimato posterior probabilities into classes.
2 %>
3 %> This is an abstraction of class decisions based on the posterior probabilities calculated by a classifier. Classifiers generate an estimato
4 %> dataset which is later processed by a decider. If the highest per-class posterior probability is below the decider decisionthreshold property,
5 %> it will “refuse to decide”, registering a class of -1 instead of a valid one.
6 %>
7 %> <h3>Reference</h3>
8 %> L. I. Kuncheva, Combining pattern classifiers. Wiley, 2004.
9 %> @sa
10 classdef decider < block
11  properties
12  %> =0. Minimum maximum probability. If not reached, assigned class will be -1, which means "refuse-to-decide". Assigning the threshold may require optimization or use of some theoretic formula.
13  decisionthreshold = 0;
14  end;
15 
16  methods
17  function o = decider(o)
18  o.classtitle = 'Decider';
19  o.inputclass = 'estimato';
20  o.flag_trainable = 0;
21  end;
22  end;
23 
24  methods(Access=protected)
25  function est = do_use(o, est)
26  [val, idx] = max(est.X, [], 2);
27  no = est.no;
28  est.classes = -1*ones(no, 1);
29  map_in = val >= o.decisionthreshold;
30  est.classes(map_in) = idx(map_in)-1;
31  est.X = val;
32  est.fea_x = 1;
33  est.fea_names = {'Support'};
34  end;
35  end;
36 end
Block that resolves estimato posterior probabilities into classes.
Definition: decider.m:10
Base Block class.
Definition: block.m:2
Dataset representing estimation.
Definition: estimato.m:4