IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
as_grades_loadings.m
Go to the documentation of this file.
1 %> @brief Loadings vector becomes the grades vector
2 %>
3 %> Trains a @ref fcon_linear block (or a @ref block_cascade) to extract one of its loadings vector.
4 %>
6  properties
7  %> @ref fcon_linear block to calculade loadings
9  %> =1. Which loadings vector to use. 1 makes sense in most cases.
10  idx_loadings = 1;
11  end;
12 
13  methods
14  function o = as_grades_loadings()
15  o.classtitle = 'Loadings';
16  o.flag_ui = 0;
17  end;
18  end;
19 
20  methods(Access=protected)
21  function out = do_use(o, data)
22  da1 = data(1);
23 
24  blk = o.fcon_linear.boot();
25  blk = blk.train(da1);
26 
27  out = log_grades();
28  out.grades = abs(blk.L(:, o.idx_loadings))';
29  out.fea_x = da1.fea_x;
30  out.xname = da1.xname;
31  out.xunit = da1.xunit;
32  out.yname = blk.get_description;
33  end;
34  end;
35 end
Cascade block: final instantializable class.
Definition: block_cascade.m:4
Feature Construction - Linear Transformations base class.
Definition: fcon_linear.m:2
Analysis Session that outputs a log_grades.
Definition: as_grades.m:2
Generated by a as_grades object, carries a "grades" vector; usually.
Definition: log_grades.m:2
Loadings vector becomes the grades vector.
Base Block class.
Definition: block.m:2