IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
demo_clssr_tree.m
Go to the documentation of this file.
1 %>@brief Draws classification regions for the Tree classifier
2 %>@file
3 %>@ingroup demo
4 %>
5 %>@sa clssr_tree
6 %>
7 %>@verbatim
8 %> if fea2 <= 5.91276
9 %> if fea1 <= 3.28594
10 %> if fea1 <= 3.02076
11 %> class 0 (18: 100%)
12 %> else
13 %> if fea1 <= 3.17833
14 %> class 1 (2: 100%)
15 %> else
16 %> class 0 (2: 100%)
17 %> else
18 %> class 1 (61: 100%)
19 %> else
20 %> class 0 (54: 98.1818%)
21 %>@endverbatim
22 %>
23 %> @image html demo_clssr_tree_result.png
24 
26 
27 % ofsgt = fsgt_fisher();
28 ofsgt = fsgt_infgain();
29 
30 clssr = clssr_tree();
31 clssr.fsgt = ofsgt;
32 % clssr.pruningtype = 1;
33 clssr.pruningtype = 3;
34 clssr.chi2threshold = 3;
35 clssr.no_levels_max = 10;
36 
37 clssr = clssr.boot();
38 clssr = clssr.train(dslila);
39 
40 est = clssr.use(dslila);
41 
42 
43 
44 pars.x_range = [1, 6];
45 pars.y_range = [3, 8];
46 pars.x_no = 200;
47 pars.y_no = 200;
48 pars.ds_train = dslila;
49 pars.ds_test = [];
50 pars.flag_last_point = 1;
51 pars.flag_link_points = 0;
52 pars.flag_regions = 1;
53 
54 figure;
56 clssr.draw_domain(pars);
57 disp(clssr.get_treedescription());
Binary Decision Tree Classifier.
Definition: clssr_tree.m:4
Classifiers base class.
Definition: clssr.m:6
function colors_markers()
function load_data_userdata_nc2nf2()
Definition: fsgt.m:5