1 %> @brief Analysis Session - Feature Selection Repeater
3 %> This is the starting point to generate a histogram
6 %> Subset Generation Specs to guide generation of different datasets to be passed to the Feature selection
object.
8 %> Feature selection
object.
10 %> Feature extractor to be used before passing the dataset to the feature selector. This may be used, e.g.,
if you want to
11 %> produce a histogram of the best, e.g., Principal Component Analysis factors. Instead of passing an already PCA-transformed
12 %> dataset to the as_fselrep, you can pass the PCA
block in the @c
fext property, so that at each iteration, the PCA
block
13 %> will be trained with the training set of that iteration only, not the whole dataset.
15 %> =0. Whether to parallelize the Feature Selection repetitions
21 o.classtitle = 'Feature Selection Repeater';
25 methods(Access=protected)
28 %> This function may pass 1 or 2 datasets to the @ref
as_fsel, depending on the @ref
sgs property. It
29 %> does not check whether the @ref as_fselrep::as_fsel needs one or two datasets.
30 function log = do_use(o, data)
31 flag_fext = ~isempty(o.
fext);
38 obsidxs = o.
sgs.get_obsidxs(data);
39 [no_reps, no_bites] = size(obsidxs); %
#ok<NASGU>
42 %---> Non-parallel version
43 ipro =
progress2_open(
'Feature Selection Repeater', [], 0, no_reps);
44 for i_rep = 1:no_reps % Cross-validation loop
46 datanow = data.split_map(obsidxs(i_rep, :), [], ff);
48 log = fsel_.use(datanow); % GO!
56 %---> PARALLEL version
60 parfor i_rep = 1:no_reps % Cross-validation loop
62 datanow = data.split_map(obsidxs(i_rep, :), [], ff); %#ok<PFBNS>
65 log = fsel_.go(); % GO!
69 irverbose(sprintf(
'Done run %d/%d; ellapsed %10.1f seconds', i_rep, no_reps, toc(t)));
76 log.fea_x = data.fea_x;
77 log.xname = data.xname;
78 log.xunit = data.xunit;
function irverbose(in s, in level)
Base Sub-dataset Generation Specification (SGS) class.
function progress2_change(in prgrss, in title, in perc, in i, in n)
function parallel_close()
function progress2_open(in title, in perc, in i, in n)
Feature Extraction (Fext) base class.
Analysis Session - Feature Selection Repeater.
Generated by fselrepeater, carries subsets of features.
function progress2_close(in prgrss)
Analysis Session (AS) base class.
function parallel_open(in no_labs)
Analysis Session that produces a log_as_fsel.