4 %> Hastie et al, Elements of Statistical Learning, 2nd ed. Springer.
14 o.classtitle = 'Sparse LDA';
17 o.L_fea_prefix = 'SLDA';
23 methods(Access=protected)
24 function o = do_train(o, data)
26 % delta = 1e-3; % l2-norm constraint
27 % stop = -30; % request 30 non-zero variables
28 % maxiter = 250; % maximum number of iterations
29 % Q = 2; % request two discriminative directions
30 % convergenceCriterion = 1e-6;
32 % % normalize training and test data
33 % [X mu d] = normalize(X);
34 % X_test = (X_test-ones(n,1)*mu)./sqrt(ones(n,1)*d);
37 % [B theta] = slda(X, Y, delta, stop, Q, maxiter, convergenceCriterion, true);
40 o.L = slda(data.X,
classes2boolean(data.classes), 1e-3, -20, 4, 500, 1e-24, true);
42 if ~isempty(o.max_loadings)
43 o.L = o.L(:, min(size(o.L, 2), o.max_loadings));
46 o.L_fea_x = data.fea_x;
Feature Construction - Linear Transformations base class.
function classes2boolean(in classes, in no_different)
function fisher_ld(in data, in flag_sphere, in flag_modified_s_b, in P, in n_max)