IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
vis_featuregrades.m
Go to the documentation of this file.
1 %> @brief Feature Grades using a @ref fsg object to grade the features
3  properties
4  %> FSG object to grade the data features
5  fsg;
6  %> Hint dataset to draw that spectrum in the background
7  data_hint;
8  end;
9 
10  methods
11  function o = vis_featuregrades(o)
12  o.classtitle = 'Feature grades';
13  o.inputclass = 'irdata';
14  o.flag_params = 1;
15  end;
16  end;
17 
18  methods(Access=protected)
19  function out = do_use(o, data)
20  fsg_ = o.fsg;
21  fsg_.data = data;
22  fsg_ = fsg_.boot();
23  grades = fsg_.calculate_grades(num2cell(1:data.nf));
24 
25  if ~isempty(o.data_hint)
26  xhint = o.data_hint.fea_x;
27  yhint = mean(o.data_hint.X);
28  else
29  xhint = [];
30  yhint = [];
31  end;
32 
33  draw_loadings(data.fea_x, grades, xhint, yhint, [], 0, [], 0, 0, 0);
34  format_xaxis(data);
35  ylabel(fsg_.classtitle);
36  set_title(o.classtitle, data);
37  make_box();
38  out = [];
39  end;
40  end;
41 end
function make_box()
Feature Grades using a fsg object to grade the features.
Dataset class.
Definition: irdata.m:30
Visualization base class.
Definition: vis.m:4
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)
FSG - Feature Subset Grader.
Definition: fsg.m:6
function set_title(in s, in obj)
function format_xaxis(in par)