1 %> @brief Feature Selection (FSel) class
15 % These are optional properties
17 %> [1][nf] vector containing feature evaluation grades.
19 %> x-axis values corresponding to the @c grades y-axis values
21 %> Input feature names, empty or having
as many elements
as fea_x
23 %> Name corresponding to fea_x
26 %> Name of y-axis (grades)
28 %> Unit of y-axis (grades)
34 o.classtitle = 'Feature Selection';
38 %> Copies properties from
object with the following properties:
41 function o = copy_axes_from(o, obj)
42 o.fea_names = obj.fea_names;
50 %> Draws selected features
52 %> Only works if @c type is 'i' and flag_complement is false, otherwise gives an error.
53 function o = draw(o, data_hint)
54 if ~exist('data_hint', 'var')
58 if strcmp(o.v_type, 'i') && ~o.flag_complement
60 % Best I can do if these optional variables are empty
62 grades_ = zeros(1, nn);
70 if ~isempty(data_hint)
71 xhint = data_hint.fea_x;
72 yhint = mean(data_hint.X);
78 draw_loadings(fea_x_, grades_, xhint, yhint, [], 0, [], 0, 0, 0, 1); % 1 is the flag_histogram
86 irerror('v_type must be ''i'' and flag_complement must be off@!');
91 methods(Access=protected)
92 % This functionality is likely to be kept by descendants, which will probably concentrate on training
93 function data = do_use(o, data)
94 if ~(strcmp(o.v_type, 'i') && ~o.flag_complement)
95 idxs =
get_feaidxs(data.fea_x, o.v, o.v_type, o.flag_complement);
96 data = data.select_features(idxs);
98 data = data.select_features(o.v);
function draw_peaks(in x, in y, in indexes, in flag_text, in color, in marker, in markersize)
Feature Selection (FSel) class.
Feature Extraction (Fext) base class.
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)
Analysis Session (AS) base class.
function get_feaidxs(in x, in v, in v_type, in flag_complement)