1 %>@brief Log generated by an @ref
as_fsel class
4 %> =[]. Indexes of selected features.
8 %> x-values to which @ref grades are the y-values
10 %> (Cell of strings) Feature names. Same number of elements
as fea_x
16 %> y-axis label (e.g.,
"classification rate",
"-log_{10}(p-value)")
18 %> Unit of y-axis (unit of the values inside grades, e.g.,
"%")
24 o.classtitle = 'Feature Selection';
25 o.moreactions = [o.moreactions, {
'extract_fsel'}];
30 function blk = extract_fsel(o)
32 blk = blk.copy_axes_from(o);
34 blk.grades = o.grades;
39 %----------ALL THIS DRAWING STUFF!
41 function o = draw(o, data_hint, flag_mark)
42 if ~exist('data_hint', 'var')
46 if ~exist('flag_mark', 'var')
50 o.draw_grades(data_hint, 0);
58 %> Gray columns for the features that were NOT selected
59 function draw_hachures(o, x, ymax)
61 idxs = 1:length(o.grades);
62 idxs(o.v) = []; % I made the algorithm below in a complement fashion, then realized the mistake
67 if i > ni && ni > 0 || (i > 1 && idxs(i)-idxs(i-1) > 1)
69 if idxs(i1) == 1 % if feature is first one, picks distance between x-points from right
70 len = x(idxs(i1)+1)-x(idxs(i1));
72 len = x(idxs(i1))-x(idxs(i1)-1);
74 x1 = x(idxs(i1))-len/4;
77 if idxs(i2) == length(x) % similar thing
78 len = x(idxs(i2))-x(idxs(i2)-1);
80 len = x(idxs(i2)+1)-x(idxs(i2));
82 x2 = x(idxs(i2))+len/4;
85 if x2 < x1 % case when the x-axis is reversed
91 if wid < 0 % case when the x-axis is reversed
105 function o = draw_grades(o, data_hint, flag_histogram)
106 if any(o.grades ~= 0)
107 if ~isempty(data_hint)
108 xhint = data_hint.fea_x;
109 yhint = mean(data_hint.X);
115 draw_loadings(o.fea_x, o.grades, xhint, yhint, [], 0, [], 0, 0, 0, flag_histogram);
119 function o = draw_markers(o)
120 if all(o.grades == 0)
121 plot(o.fea_x([1, end]), [0, 0], 'LineWidth',
scaled(3), 'Color', [0, 0, 0]);
129 %> Takes care of axes, Frank, box
130 function o = draw_finish(o)
139 set(gca, 'ytick', []);
143 set(gca, 'ylim', [ymin, ymax]);
function draw_peaks(in x, in y, in indexes, in flag_text, in color, in marker, in markersize)
Feature Selection (FSel) class.
function find_color(in i)
Log generated by an as_fsel class.
Property v
=[]. See get_feaidxs.m
function draw_loadings(in x, in L, in x_hint, in hint, in legends, in flag_abs, in peakd, in flag_trace_minalt, in flag_draw_peaks, in flag_print_peaks, in flag_histogram, in flag_envelope, in colors)
Property flag_ui
(GUI setting) Whether to "publish" in blockmenu and datatool. Note that a class can be "published" wi...
Analysis Session (AS) base class.
Analysis Session that produces a log_as_fsel.
function draw_hachure(in position)