IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
blbl_extract_cv.m
Go to the documentation of this file.
1 %> @brief Extracts cluster vectors from block.
2 %>
3 %> Generates a fcon_linear_fixed block whose loadings matrix is the cluster vectors of the input block.
4 %>
5 %> @sa data_get_cv.m, uip_blbl_extract_cv.m
6 classdef blbl_extract_cv < blbl
7  properties
8  idx_class_origin = 1;
9  data;
10  end;
11 
12  methods
13  function o = blbl_extract_cv(o)
14  o.classtitle = 'Extract Cluster Vectors';
15  o.inputclass = {'fcon_linear', 'block_cascade_base'};
16  end;
17  end;
18 
19  methods(Access=protected)
20  function oo = do_use(o, block)
21  if block.flag_trainable > 0 && ~block.flag_trained
22  irerror('Input block to blbl_extract_cv needs to be trained!');
23  end;
24 
25  ob = fcon_linear_fixed();
26  ob.L = data_get_cv(o.data, block.L, o.idx_class_origin);
27  ob.L_fea_x = o.data.fea_x;
28  ob.xname = o.data.xname;
29  ob.xunit = o.data.xunit;
30  ob.L_fea_names = o.data.classlabels;
31  oo = ob;
32  end;
33 
34  end;
35 end
Extracts cluster vectors from block.
function irerror(in s)
Base Block class.
Definition: block.m:2
Loadings vector specified directly.
Other blocks.
Definition: blbl.m:3
function data_get_cv(in data, in L, in idx_class_origin)