4 %> [number of selected features]x[nf (total number of features dataset)]. Individual hits.
6 %> Number of selected features used to compose @c grades
12 o.classtitle = 'Histogram';
21 %>@brief Draws histograms
23 %> Will generate subplots if @c idxs has more than one element
25 %> @param idxs=all Indexes of feature orders to plot
26 function o = draw_hists(o, idxs, data_hint, flag_group)
28 idxs = 1:size(o.hitss, 1);
30 if any(idxs > size(o.hitss, 1))
31 irverbose('Info: histograms index was trimmed');
33 idxs(idxs > size(o.hitss, 1)) = [];
36 if ~exist('flag_group', 'var')
40 if nargin < 3 || isempty(data_hint)
44 xhint = data_hint.fea_x;
45 yhint = mean(data_hint.X, 1);
48 [nor, nf] = size(o.hitss); %
#ok<NASGU>
62 draw_loadings(o.fea_x, o.hitss(idx, :), xhint, yhint, [], 0, [], 0, 0, 0, 1, [], {
find_color_stackedhist(idx)});
63 ylabel(sprintf(
'%s',
int2ord(idx)));
65 set(gca,
'xtick', []);
70 v = sum(o.hitss(idxs, :), 1);
71 draw_loadings(o.fea_x, v, xhint, yhint, [], 0, [], 0, 0, 0, 1);
73 title(sprintf(
'Histograms taken: %s', mat2str(idxs)));
78 %>@brief Draws histograms Using stacked bars
80 %> Note that
this will work
for Forward Feature Selection only
82 %> @param data_hint Hint dataset
83 %> @param no_inside Number of histograms that are considered
"informative"
84 %> @param colors =(
default colors). Either a cell of 2 elements or 4 elements. If it is a cell of two elements,
85 %> the non-informative and informative histograms will have gradients
86 %> @param
peakdetector Use it to mark peaks in the histogram
87 %> @param flag_trace_minalt =~isempty(peakd) Whether to draw the threshold line. Only works
if the peak detector is passed.
89 function draw_stackedhists(o, data_hint, colors,
peakdetector, flag_trace_minalt)
90 if nargin < 2 || isempty(data_hint)
94 xhint = data_hint.fea_x;
95 yhint = mean(data_hint.X, 1);
105 if ~exist('flag_trace_minalt', 'var') || isempty(flag_trace_minalt)
106 flag_trace_minalt = ~isempty(peakdetector);
109 draw_stacked(o.fea_x, o.hitss, o.nf4grades, colors, xhint, yhint, peakdetector, flag_trace_minalt, 1, 1, 1);
115 %> Draws each per-feature-position histogram
as a line
116 function draw_as_lines(o)
117 for i = 1:size(o.hitss, 1);
121 set(gca, 'Ylim', [0, max(o.hitss(:))*1.025]);
function irverbose(in s, in level)
Generated by subsetsprocessor, carries a histogram.
Generated by a as_grades object, carries a "grades" vector; usually.
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)
Processor of a set of subsets of features.
Analysis Session (AS) base class.
function find_color_stackedhist(in i)
function draw_stacked(in x, in histss, in no_informative, in colors, in x_hint, in hint, in peakd, in flag_trace_minalt, in flag_draw_peaks, in flag_print_peaks, in flag_text)