1 %> @brief Flips the means around a reference
class
3 %> This tool was derived from discussions with Valon. He wanted to have a quantitative measurement of effect
for his dose-response papers.
4 %> However, sometimes the CONTROL
class was in the middle of the scatter plots.
6 %> It translates each
class to the positive side, maintaining the same class structure, by making <code>X_class = X_class-class_mean+abs(class_mean)</code>
8 %> @sa uip_pre_sub_refmean.m
11 %> =1. Index of reference
class (1-based = first
class is class "1")
17 o.classtitle = 'Flip means around a reference class';
21 methods(Access=protected)
22 function data = do_use(o, data)
23 me = mean(data.X(data.classes == (o.idx_refclass-1), :));
25 data.X = data.X-repmat(me, data.no, 1);
28 idxs = data.classes == i-1; % Indexes of spectra from class i-1
29 Xtemp = data.X(idxs, :);
34 % Translates the whole class to the positive side, maintaining the same
35 data.X(idxs, :) = Xtemp-repmat(me, no, 1)+repmat(abs(me), no, 1);
Flips the means around a reference class.
Pre-processing block base class.