1 %> @brief Asymmetric Least-Squares Baseline Correction
3 %> you can vary the values of
'lambda' and
'p' to see the effect on
4 %> smoothness, also the base line
7 %> Baseline Correction with Asymmetric Least Squares Smoothing. Paul H. C. Eilers, Hans F.M. Boelens. October 21, 2005
9 %> @sa uip_pre_bc_asls.m
12 %> =0.001. Recommended: 0.001 <= @p p <= 0.1
14 %> =1e5. Recommended: 10^2 <= @p lambda <= 10^9
23 o.classtitle = 'Asymmetric Least-Squares Smoothing';
28 methods(Access=protected)
31 %> Applies
block to dataset
32 function data = go_use(o, data)
38 %> Estimate baseline with asymmetric least squares
40 D = diff(speye(m), 2);
43 for it = 1:o.no_iterations
44 W = spdiags(w, 0, m, m);
45 C = chol(W + o.lambda * D' * D);
46 z = C \ (C' \ (w .* aa));
47 w = o.p * (aa > z) + (1 - o.p)*(aa < z);
Baseline Correction base class.
Asymmetric Least-Squares Baseline Correction.