IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
fcon_lda.m
Go to the documentation of this file.
1 %> @brief Fisher's Linear Discriminant Analysis
2 %> @sa fisher_ld.m, uip_fcon_lda.m
3 classdef fcon_lda < fcon_linear
4  properties
5  flag_sphere = 0;
6  flag_modified_s_b = 0;
7  %> Penalty coefficients: [0-th derivative penalty, 1st derivative penalty, 2nd ..., ...]
8  penalty = 0;
9  max_loadings;
10  end;
11 
12  methods
13  function o = fcon_lda(o)
14  o.classtitle = 'Linear Discriminant Analysis';
15  o.short = 'LDA';
16  o.flag_trainable = 1;
17  o.L_fea_prefix = 'LD';
18  end;
19 
20  end;
21 
22  methods(Access=protected)
23  function o = do_train(o, data)
24  [o.L, lambdas] = fisher_ld(data, o.flag_sphere, o.flag_modified_s_b, o.penalty, o.max_loadings);
25  o.L_fea_x = data.fea_x;
26  o.xname = data.xname;
27  o.xunit = data.xunit;
28  end;
29  end;
30 end