sablib
Loading...
Searching...
No Matches
asls.h File Reference

Baseline estimation using Asymmetric Least Squares Smoothing(AsLS). More...

#include <stdexcept>
#include "../smoothing/whittaker.h"

Go to the source code of this file.

Functions

const std::vector< double > sablib::BaselineAsLS (std::vector< double > &y, const double lambda, const double p, const unsigned int s=2, const unsigned int loop=10, const double eps=1e-3)
 Performs baseline estimation using Asymmetric Least Squares Smoothing (AsLS).

Detailed Description

Baseline estimation using Asymmetric Least Squares Smoothing(AsLS).

Author
Izadori

References:

  • Eilers, P. A Perfect Smoother. Analytical Chemistry, 2003, 75(14), 3631-3636.
  • Eilers, P. H. C.; Boelens, H. F. M. Baseline Correction with Asymmetric Least Squares Smoothing Leiden University Medical Centre Report 2005, 1(1), 1-5.

Definition in file asls.h.

Function Documentation

◆ BaselineAsLS()

const std::vector< double > sablib::BaselineAsLS ( std::vector< double > & y,
const double lambda,
const double p,
const unsigned int s = 2,
const unsigned int loop = 10,
const double eps = 1e-3 )

Performs baseline estimation using Asymmetric Least Squares Smoothing (AsLS).

Parameters
yThe input data for baseline estimation.
lambdaSmoothing parameter.
pWeight (asymmetry parameter, typically 0.001 to 0.1).
sThe order of the difference (usually s = 1, 2, or 3).
loopMaximum number of iterations.
epsConvergence threshold.
Returns
The estimated baseline.
Exceptions
std::invalid_argumentOne or more parameters are wrong.

Definition at line 14 of file asls.cpp.